v5stable
Ondřej Hruška 11 years ago
parent ebbcf50f74
commit e3e77dc308
  1. 24
      src/mightypork/rogue/App.java
  2. 6
      src/mightypork/utils/logging/Log.java

@ -2,6 +2,7 @@ package mightypork.rogue;
import java.io.File; import java.io.File;
import java.util.Locale;
import mightypork.gamecore.control.BaseApp; import mightypork.gamecore.control.BaseApp;
import mightypork.gamecore.control.GameLoop; import mightypork.gamecore.control.GameLoop;
@ -17,6 +18,8 @@ import mightypork.rogue.screens.test_bouncyboxes.ScreenTestBouncy;
import mightypork.rogue.screens.test_cat_sound.ScreenTestCat; import mightypork.rogue.screens.test_cat_sound.ScreenTestCat;
import mightypork.rogue.screens.test_font.ScreenTestFont; import mightypork.rogue.screens.test_font.ScreenTestFont;
import mightypork.rogue.screens.test_render.ScreenTestRender; import mightypork.rogue.screens.test_render.ScreenTestRender;
import mightypork.utils.logging.Log;
import mightypork.utils.logging.LogWriter;
/** /**
@ -82,17 +85,16 @@ public class App extends BaseApp {
} }
// @Override @Override
// protected LogWriter createLog() protected LogWriter createLog()
// { {
// Locale.setDefault(Locale.ENGLISH); Locale.setDefault(Locale.ENGLISH);
//
// final LogWriter log = Log.create("runtime", Paths.LOG_FILE, 10); final LogWriter log = Log.create("runtime", Paths.LOG_FILE, 10);
// log.setLevel(Level.WARNING);
// log.enable(Config.LOGGING_ENABLED); return log;
// }
// return log;
// }
@Override @Override
protected void initDisplay(DisplaySystem display) protected void initDisplay(DisplaySystem display)

@ -105,8 +105,7 @@ public class Log {
public static void log(Level level, String msg) public static void log(Level level, String msg)
{ {
if (enabled) { if (enabled) {
final long ms = System.currentTimeMillis() - start_ms; sysoMonitor.onMessageLogged(level, formatMessage(level, msg, null, start_ms));
sysoMonitor.onMessageLogged(level, formatMessage(level, msg, null, ms));
if (main != null) { if (main != null) {
main.log(level, msg); main.log(level, msg);
@ -125,8 +124,7 @@ public class Log {
public static void log(Level level, String msg, Throwable t) public static void log(Level level, String msg, Throwable t)
{ {
if (enabled) { if (enabled) {
final long ms = System.currentTimeMillis() - start_ms; sysoMonitor.onMessageLogged(level, formatMessage(level, msg, t, start_ms));
sysoMonitor.onMessageLogged(level, formatMessage(level, msg, t, ms));
if (main != null) { if (main != null) {
main.log(level, msg, t); main.log(level, msg, t);

Loading…
Cancel
Save