Где возможно заменил System.out/err на logger
This commit is contained in:
@@ -46,6 +46,8 @@ import lwjake2.sys.Timer;
|
|||||||
import lwjake2.util.Lib;
|
import lwjake2.util.Lib;
|
||||||
import lwjake2.util.Math3D;
|
import lwjake2.util.Math3D;
|
||||||
import lwjake2.util.Vargs;
|
import lwjake2.util.Vargs;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.RandomAccessFile;
|
import java.io.RandomAccessFile;
|
||||||
@@ -56,6 +58,7 @@ import java.nio.ByteOrder;
|
|||||||
* CL
|
* CL
|
||||||
*/
|
*/
|
||||||
public final class CL {
|
public final class CL {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(CL.class);
|
||||||
|
|
||||||
static int precache_check; // for autodownload of precache items
|
static int precache_check; // for autodownload of precache items
|
||||||
|
|
||||||
@@ -1573,7 +1576,7 @@ public final class CL {
|
|||||||
public static void Shutdown() {
|
public static void Shutdown() {
|
||||||
|
|
||||||
if (isdown) {
|
if (isdown) {
|
||||||
System.out.print("recursive shutdown\n");
|
logger.info("recursive shutdown");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isdown = true;
|
isdown = true;
|
||||||
|
|||||||
@@ -22,10 +22,13 @@ import lwjake2.Defines;
|
|||||||
import lwjake2.qcommon.Com;
|
import lwjake2.qcommon.Com;
|
||||||
import lwjake2.util.Lib;
|
import lwjake2.util.Lib;
|
||||||
import lwjake2.util.QuakeFile;
|
import lwjake2.util.QuakeFile;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class edict_t {
|
public class edict_t {
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(edict_t.class);
|
||||||
|
|
||||||
/** Constructor. */
|
/** Constructor. */
|
||||||
public edict_t(int i) {
|
public edict_t(int i) {
|
||||||
@@ -768,6 +771,6 @@ public class edict_t {
|
|||||||
|
|
||||||
// rst's checker :-)
|
// rst's checker :-)
|
||||||
if (f.readInt() != 9876)
|
if (f.readInt() != 9876)
|
||||||
System.err.println("ent load check failed for num " + index);
|
logger.error("ent load check failed for num {}", index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,12 +19,14 @@
|
|||||||
package lwjake2.game;
|
package lwjake2.game;
|
||||||
|
|
||||||
import lwjake2.util.QuakeFile;
|
import lwjake2.util.QuakeFile;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class gclient_t
|
public class gclient_t
|
||||||
{
|
{
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(gclient_t.class);
|
||||||
public gclient_t(int index)
|
public gclient_t(int index)
|
||||||
{
|
{
|
||||||
this.index = index;
|
this.index = index;
|
||||||
@@ -303,7 +305,7 @@ public class gclient_t
|
|||||||
update_chase = f.readInt() != 0;
|
update_chase = f.readInt() != 0;
|
||||||
|
|
||||||
if (f.readInt() != 8765)
|
if (f.readInt() != 8765)
|
||||||
System.err.println("game client load failed for num=" + index);
|
logger.error("game client load failed for num={}", index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Writes a game_client_t (a player) to a file. */
|
/** Writes a game_client_t (a player) to a file. */
|
||||||
|
|||||||
@@ -19,12 +19,14 @@
|
|||||||
package lwjake2.game;
|
package lwjake2.game;
|
||||||
|
|
||||||
import lwjake2.util.QuakeFile;
|
import lwjake2.util.QuakeFile;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class level_locals_t
|
public class level_locals_t
|
||||||
{
|
{
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(level_locals_t.class);
|
||||||
// this structure is cleared as each map is entered
|
// this structure is cleared as each map is entered
|
||||||
// it is read/written to the level.sav file for savegames
|
// it is read/written to the level.sav file for savegames
|
||||||
//
|
//
|
||||||
@@ -149,6 +151,6 @@ public class level_locals_t
|
|||||||
|
|
||||||
// rst's checker :-)
|
// rst's checker :-)
|
||||||
if (f.readInt()!= 4711)
|
if (f.readInt()!= 4711)
|
||||||
System.out.println("error in reading level_locals.");
|
logger.error("error in reading level_locals.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ package lwjake2.sound.lwjgl;
|
|||||||
|
|
||||||
import lwjake2.Globals;
|
import lwjake2.Globals;
|
||||||
import lwjake2.util.Math3D;
|
import lwjake2.util.Math3D;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PlaySound
|
* PlaySound
|
||||||
@@ -27,6 +29,7 @@ import lwjake2.util.Math3D;
|
|||||||
* @author cwei
|
* @author cwei
|
||||||
*/
|
*/
|
||||||
public class PlaySound {
|
public class PlaySound {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(PlaySound.class);
|
||||||
|
|
||||||
final static int MAX_PLAYSOUNDS = 128;
|
final static int MAX_PLAYSOUNDS = 128;
|
||||||
|
|
||||||
@@ -155,7 +158,7 @@ public class PlaySound {
|
|||||||
ps.beginTime = Globals.cl.time + (long)(timeoffset * 1000);
|
ps.beginTime = Globals.cl.time + (long)(timeoffset * 1000);
|
||||||
PlaySound.add(ps);
|
PlaySound.add(ps);
|
||||||
} else {
|
} else {
|
||||||
System.err.println("PlaySounds out of Limit");
|
logger.error("PlaySounds out of Limit");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user