From 3391586058e1b0cdb0c9245ed353f592436faa53 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 9 Nov 2015 10:58:05 +1300 Subject: Change log messages formatting --- src/org/traccar/helper/Log.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/helper') diff --git a/src/org/traccar/helper/Log.java b/src/org/traccar/helper/Log.java index 0e55a5445..2b747734e 100644 --- a/src/org/traccar/helper/Log.java +++ b/src/org/traccar/helper/Log.java @@ -40,6 +40,8 @@ public final class Log { private Log() { } + public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; + private static final String LOGGER_NAME = "traccar"; private static final String STACK_PACKAGE = "org.traccar"; @@ -49,7 +51,7 @@ public final class Log { public static void setupLogger(Config config) throws IOException { - Layout layout = new PatternLayout("%d{yyyy-MM-dd HH:mm:ss} %5p: %m%n"); + Layout layout = new PatternLayout("%d{" + DATE_FORMAT + "} %5p: %m%n"); Appender appender = new DailyRollingFileAppender( layout, config.getString("logger.file"), "'.'yyyyMMdd"); -- cgit v1.2.3