using SLF4J for logging

This commit is contained in:
wyq 2024-04-04 18:15:16 +08:00
parent 74363fd57c
commit c38d356102
5 changed files with 19 additions and 15 deletions

View File

@ -10,15 +10,16 @@ import org.meteoinfo.geometry.legend.LegendScheme;
import org.meteoinfo.ndarray.Array;
import org.meteoinfo.ndarray.Index;
import org.meteoinfo.ndarray.math.ArrayUtil;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import java.awt.*;
import java.util.*;
import java.util.List;
import java.util.logging.Logger;
public class TriMeshGraphic extends GraphicCollection3D {
protected Logger logger = Logger.getLogger("TriMeshGraphic");
protected Logger logger = LoggerFactory.getLogger("TriMeshGraphic");
protected float[] vertexPosition;
protected float[] vertexValue;
protected float[] vertexColor;

View File

@ -3,19 +3,20 @@ package org.meteoinfo.chart.io;
import org.meteoinfo.chart.graphic.TriMeshGraphic;
import org.meteoinfo.ndarray.Array;
import org.meteoinfo.ndarray.DataType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.logging.Logger;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class WavefrontObjectLoader {
private Logger logger = Logger.getLogger("Wavefront Object Loader");
private Logger logger = LoggerFactory.getLogger("Wavefront Object Loader");
private ArrayList<float[]> vData = new ArrayList<float[]>(); //list of vertex coordinates
private ArrayList<float[]> vtData = new ArrayList<float[]>(); //list of texture coordinates
private ArrayList<float[]> vnData = new ArrayList<float[]>(); //list of normal coordinates
@ -43,13 +44,13 @@ public class WavefrontObjectLoader {
tZipEntry = tZipInputStream.getNextEntry();
String inZipEntryName = tZipEntry.getName();
if (inZipEntryName==null) {
logger.severe("ERROR! ZIP ENTRY IS NULL!");
logger.error("ERROR! ZIP ENTRY IS NULL!");
}
logger.info("EXTRACTING: " + inZipEntryName);
if (!tZipEntry.isDirectory()) {
br = new BufferedReader(new InputStreamReader(tZipInputStream));
} else {
logger.severe("ERROR! ZIP ENTRY IS DIRECTORY! SHOULD BE PLAIN FILE!");
logger.error("ERROR! ZIP ENTRY IS DIRECTORY! SHOULD BE PLAIN FILE!");
}
} else {
br = new BufferedReader(new InputStreamReader(Files.newInputStream(Paths.get(objFileName))));
@ -74,7 +75,7 @@ public class WavefrontObjectLoader {
br.close();
logger.info("MODEL " + objFileName + " SUCCESSFULLY LOADED!");
} catch (IOException e) {
logger.severe(e.toString());
logger.error(e.toString());
}
}

View File

@ -67,7 +67,7 @@ import java.util.zip.ZipInputStream;
public static String getVersion(){
String version = GlobalUtil.class.getPackage().getImplementationVersion();
if (version == null || version.equals("")) {
version = "3.8.3";
version = "3.8.4";
}
return version;
}

View File

@ -1,32 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Working\MIScript\Jython\mis\io\netcdf">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\3d_earth"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\geoshow"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\json"/>
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model">
<RecentFolder Folder="D:\Temp\working\acidrain"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\geoshow"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\plot"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\hdf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\awx"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\grads"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\netcdf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\3d_earth"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model"/>
</Path>
<File>
<OpenedFiles>
<OpenedFile File="D:\Working\MIScript\Jython\mis\map\geoshow\geoshow_2.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\plot\Line2D_1.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\netcdf\eccc_1.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_wolf.py"/>
</OpenedFiles>
<RecentFiles>
<RecentFile File="D:\Working\MIScript\Jython\mis\map\geoshow\geoshow_2.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\plot\Line2D_1.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\io\netcdf\eccc_1.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_wolf.py"/>
</RecentFiles>
</File>
<Font>

View File

@ -35,7 +35,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<revision>3.8.3</revision>
<revision>3.8.4</revision>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>