Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SpectrumIM/spectrum2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Takmazov <vitalyster@gmail.com>2022-02-02 14:12:42 +0300
committerVitaly Takmazov <vitalyster@gmail.com>2022-02-02 14:16:49 +0300
commit1648d05c08459ec45391885985324f1c15a92dda (patch)
treeefb83f4e65c2679d8e92ac4914089cc28f99530a
parent11ee0c682dc1ffaa0d4540093a23ef5b6ebdee5b (diff)
Docker: log to stdout
* Do not show log files from entrypoint script * Example logger configurations uses stdout
-rwxr-xr-xpackaging/docker/run.sh1
-rw-r--r--tests/xmpp/configuration/backend-logging.cfg14
-rw-r--r--tests/xmpp/configuration/logging.cfg15
-rw-r--r--tests/xmpp/configuration/manager-logging.cfg14
4 files changed, 14 insertions, 30 deletions
diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh
index 3e1d4b63..80717830 100755
--- a/packaging/docker/run.sh
+++ b/packaging/docker/run.sh
@@ -15,4 +15,3 @@ echo "You should mount the directory with configuration files to /etc/spectrum2/
echo "Check the http://spectrum.im/documentation for more information."
spectrum2_manager start
spectrum2_manager server &
-tail -f /var/log/spectrum2/*/* 2>/dev/null
diff --git a/tests/xmpp/configuration/backend-logging.cfg b/tests/xmpp/configuration/backend-logging.cfg
index 1078afe2..203ebc3d 100644
--- a/tests/xmpp/configuration/backend-logging.cfg
+++ b/tests/xmpp/configuration/backend-logging.cfg
@@ -1,11 +1,7 @@
-log4j.rootLogger=debug, R
+log4j.rootLogger=debug, stdout
-log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=/var/log/spectrum2/${jid}/backends/backend-${id}.log
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %-5p %c: %m%n
-log4j.appender.R.MaxFileSize=10000KB
-# Keep one backup file
-log4j.appender.R.MaxBackupIndex=1
-
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
-log4j.appender.R.layout.ConversionPattern=${pid}: %d %-5p %c: %m%n
+log4j.category.Component.XML = ON
diff --git a/tests/xmpp/configuration/logging.cfg b/tests/xmpp/configuration/logging.cfg
index 5ac8ee58..203ebc3d 100644
--- a/tests/xmpp/configuration/logging.cfg
+++ b/tests/xmpp/configuration/logging.cfg
@@ -1,14 +1,7 @@
-log4j.rootLogger=debug, R
+log4j.rootLogger=debug, stdout
-log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=/var/log/spectrum2/${jid}/spectrum2.log
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %-5p %c: %m%n
-log4j.appender.R.MaxFileSize=10000KB
-# Keep one backup file
-log4j.appender.R.MaxBackupIndex=1
-
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
-log4j.appender.R.layout.ConversionPattern=%d %-5p %c: %m%n
-
-# Disable XML category
log4j.category.Component.XML = ON
diff --git a/tests/xmpp/configuration/manager-logging.cfg b/tests/xmpp/configuration/manager-logging.cfg
index 607a3d83..203ebc3d 100644
--- a/tests/xmpp/configuration/manager-logging.cfg
+++ b/tests/xmpp/configuration/manager-logging.cfg
@@ -1,11 +1,7 @@
-log4j.rootLogger=debug, R
+log4j.rootLogger=debug, stdout
-log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=/var/log/spectrum2/spectrum_manager.log
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %-5p %c: %m%n
-log4j.appender.R.MaxFileSize=10000KB
-# Keep one backup file
-log4j.appender.R.MaxBackupIndex=1
-
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
-log4j.appender.R.layout.ConversionPattern=%d %-5p %c: %m%n
+log4j.category.Component.XML = ON