summaryrefslogtreecommitdiff
path: root/log4qt-debug.conf
diff options
context:
space:
mode:
authorTomasz Sterna <tomek@xiaoka.com>2014-07-11 21:06:39 +0200
committerTomasz Sterna <tomek@xiaoka.com>2014-07-11 21:06:39 +0200
commitefb33d6494d88c27c8766553b6a963ddf2654458 (patch)
tree76dd5e56b79191074998c0fb6bf7b81276116a4b /log4qt-debug.conf
parent072da88eee57e5d16f0b75c7b90c8a0bc6a60cb3 (diff)
Included Log4Qt in project
Diffstat (limited to 'log4qt-debug.conf')
-rw-r--r--log4qt-debug.conf42
1 files changed, 42 insertions, 0 deletions
diff --git a/log4qt-debug.conf b/log4qt-debug.conf
new file mode 100644
index 0000000..52af6e1
--- /dev/null
+++ b/log4qt-debug.conf
@@ -0,0 +1,42 @@
+# Set root logger level. Nothing less important will ever be printed. E.g. TRACE messages will be skipped
+# rootLogger will send messages coming to it further to three printing mechanisms: to console,
+# syslog and file logger (all three defined below)
+log4j.rootLogger=DEBUG, consolelog, syslog, filelog
+
+# Define a ConsoleAppender. Colors you are supposed to see on Windows only. Didn't check it myself though
+# Console will print everything that gets to rootLogger, i.e. all DEBUG+ messages
+log4j.appender.consolelog=org.apache.log4j.ColorConsoleAppender
+# Use SimpleTimeLayout.
+log4j.appender.consolelog.layout=org.apache.log4j.SimpleTimeLayout
+
+# Let's not overload syslog and dump only ERROR+ messages to it
+# Also no need for SimpleTimeLayout here. journalctl will record timestamp anyway
+log4j.appender.syslog=org.apache.log4j.SystemLogAppender
+log4j.appender.syslog.layout=org.apache.log4j.SimpleLayout
+log4j.appender.syslog.serviceName=journalctl
+log4j.appender.syslog.threshold=ERROR
+
+# DailyRollingFileAppender will create a new log file every day
+# .cache directory can be cleaned by anyone, but as a good developer in the production code you should
+# delete too old log files yourself. For example on every app start you could delete logs that are older
+# than a couple of months
+log4j.appender.filelog=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.filelog.layout=org.apache.log4j.SimpleTimeLayout
+
+# @see in main.cpp how $XDG_CACHE_HOME is replaced with full path
+log4j.appender.filelog.file=$XDG_CACHE_HOME/harbour-log4qtdemo.log
+
+################
+# Class/logger specific thresholds now.
+# Ones for which threshold is not specified will use root logger's DEBUG level
+# Use stricter levels for loggers that you want to shut up
+################
+
+# For example Company class is so stable, you only want ERROR+ messages from it
+log4j.logger.Company=ERROR
+#log4j.logger.bill=WARN
+
+# console.log() just as qDebug() goes to logger called "Qt" and uses level DEBUG.
+# So setting it to INFO would suppress
+# console.log() messages
+# log4j.logger.Qt=INFO