diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-10-10 20:02:24 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-10-10 20:02:24 +1300 |
commit | a1edb0aefe22fbb2496c9f4c665750819dab9857 (patch) | |
tree | d7d4017d7c87631287799739640acfad1c5fc3b6 | |
parent | 0078b360e1d39981c941501c1dfa80b5f2d86d21 (diff) | |
parent | 5692ad122a148a68fdf26fe0c35e06cbfbc32620 (diff) | |
download | traccar-server-a1edb0aefe22fbb2496c9f4c665750819dab9857.tar.gz traccar-server-a1edb0aefe22fbb2496c9f4c665750819dab9857.tar.bz2 traccar-server-a1edb0aefe22fbb2496c9f4c665750819dab9857.zip |
Merge pull request #913 from jon-stumpf/enhancement-log-level
Add logger.level capability
-rw-r--r-- | default.cfg | 1 | ||||
-rw-r--r-- | setup/linux/traccar.cfg | 1 | ||||
-rw-r--r-- | setup/macosx/traccar.cfg | 1 | ||||
-rw-r--r-- | setup/windows/traccar.cfg | 1 | ||||
-rw-r--r-- | src/org/traccar/helper/Log.java | 2 |
5 files changed, 5 insertions, 1 deletions
diff --git a/default.cfg b/default.cfg index 4983bac16..fb6d6ae08 100644 --- a/default.cfg +++ b/default.cfg @@ -65,6 +65,7 @@ <!-- Logging options --> <entry key='logger.enable'>true</entry> + <entry key='logger.level'>info</entry> <entry key='logger.file'>/home/user/Documents/traccar/target/tracker-server.log</entry> <!-- Xexun server configuration --> diff --git a/setup/linux/traccar.cfg b/setup/linux/traccar.cfg index 74bb6a97f..75dd55356 100644 --- a/setup/linux/traccar.cfg +++ b/setup/linux/traccar.cfg @@ -65,6 +65,7 @@ <!-- Logging options --> <entry key='logger.enable'>true</entry> + <entry key='logger.level'>info</entry> <entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry> <!-- Xexun server configuration --> diff --git a/setup/macosx/traccar.cfg b/setup/macosx/traccar.cfg index 74bb6a97f..75dd55356 100644 --- a/setup/macosx/traccar.cfg +++ b/setup/macosx/traccar.cfg @@ -65,6 +65,7 @@ <!-- Logging options --> <entry key='logger.enable'>true</entry> + <entry key='logger.level'>info</entry> <entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry> <!-- Xexun server configuration --> diff --git a/setup/windows/traccar.cfg b/setup/windows/traccar.cfg index 781592f9e..379f50ecf 100644 --- a/setup/windows/traccar.cfg +++ b/setup/windows/traccar.cfg @@ -65,6 +65,7 @@ <!-- Logging options -->
<entry key='logger.enable'>true</entry>
+ <entry key='logger.level'>info</entry>
<entry key='logger.file'>[LOG]</entry>
<!-- Xexun server configuration -->
diff --git a/src/org/traccar/helper/Log.java b/src/org/traccar/helper/Log.java index a5e9f7594..7d8d24c21 100644 --- a/src/org/traccar/helper/Log.java +++ b/src/org/traccar/helper/Log.java @@ -48,7 +48,7 @@ public class Log { LogManager.resetConfiguration(); logger = Logger.getLogger(LOGGER_NAME); logger.addAppender(appender); - logger.setLevel(Level.ALL); + logger.setLevel(Level.toLevel(properties.getProperty("logger.level"), Level.ALL)); // Workaround for "Bug 745866 - (EDG-45) Possible netty logging config problem" InternalLoggerFactory.setDefaultFactory(new InternalLoggerFactory() { |