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.util.Locale;
import mightypork.gamecore.control.BaseApp;
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_font.ScreenTestFont;
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
// protected LogWriter createLog()
// {
// Locale.setDefault(Locale.ENGLISH);
//
// final LogWriter log = Log.create("runtime", Paths.LOG_FILE, 10);
// log.setLevel(Level.WARNING);
// log.enable(Config.LOGGING_ENABLED);
//
// return log;
// }
@Override
protected LogWriter createLog()
{
Locale.setDefault(Locale.ENGLISH);
final LogWriter log = Log.create("runtime", Paths.LOG_FILE, 10);
return log;
}
@Override
protected void initDisplay(DisplaySystem display)

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

Loading…
Cancel
Save