Skip to content

Commit

Permalink
support control of log level for all components
Browse files Browse the repository at this point in the history
  • Loading branch information
flecno committed Nov 10, 2020
1 parent e5746ae commit 942bd17
Show file tree
Hide file tree
Showing 16 changed files with 78 additions and 38 deletions.
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ services:
- ENABLE_TALK_WHILE_MUTED
- ENABLE_TCC
- ENABLE_TRANSCRIPTIONS
- ENABLE_WEB_ACCESS_LOGS
- ETHERPAD_PUBLIC_URL
- ETHERPAD_URL_BASE
- GOOGLE_ANALYTICS_ID
Expand Down Expand Up @@ -153,7 +154,7 @@ services:
- JWT_ALLOW_EMPTY
- JWT_AUTH_TYPE
- JWT_TOKEN_AUTH_MODULE
- LOG_LEVEL
- PROSODY_LOG_LEVEL
- PUBLIC_URL
- TZ
networks:
Expand Down Expand Up @@ -184,6 +185,7 @@ services:
- JIGASI_SIP_URI
- JIBRI_BREWERY_MUC
- JIBRI_PENDING_TIMEOUT
- JICOFO_LOG_LEVEL
- TZ
depends_on:
- prosody
Expand Down Expand Up @@ -215,6 +217,7 @@ services:
- JVB_ENABLE_APIS
- JVB_WS_DOMAIN
- JVB_WS_SERVER_ID
- JVB_LOG_LEVEL
- PUBLIC_URL
- TZ
depends_on:
Expand Down
27 changes: 27 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ TZ=UTC
# Set etherpad-lite public URL (uncomment to enable)
#ETHERPAD_PUBLIC_URL=https://etherpad.my.domain

# Disable IP logging
#ETHERPAD_DISABLE_IP_LOGGING=false

# Controls which logs are written to stdout. Supported levels: DEBUG, INFO, WARN, ERROR
#ETHERPAD_LOG_LEVEL=INFO

#
# Basic Jigasi configuration options (needed for SIP gateway support)
#
Expand Down Expand Up @@ -210,6 +216,9 @@ XMPP_MUC_MODULES=
# Custom Prosody modules for internal MUC component (comma separated)
XMPP_INTERNAL_MUC_MODULES=

# Controls which logs are output from prosody and associated modules
PROSODY_LOG_LEVEL=info

# MUC for the JVB pool
JVB_BREWERY_MUC=jvbbrewery

Expand All @@ -231,6 +240,12 @@ JVB_TCP_MAPPED_PORT=4443
# See https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest.md for more information
#JVB_ENABLE_APIS=rest,colibri

# Controls which logs are written to stdout. Supported java log levels are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
#JVB_LOG_LEVEL=INFO

# XMPP component password for Jicofo
JICOFO_COMPONENT_SECRET=s3cr37

# XMPP user for Jicofo client connections.
# NOTE: this option doesn't currently work due to a bug
JICOFO_AUTH_USER=focus
Expand All @@ -241,6 +256,9 @@ JICOFO_AUTH_USER=focus
# Enable Jicofo's health check REST API (http://<jicofo_base_url>:8888/about/health)
#JICOFO_ENABLE_HEALTH_CHECKS=true

# Controls which logs are written to stdout. Supported java log levels are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
#JICOFO_LOG_LEVEL=INFO

# XMPP user for Jigasi MUC client connections
JIGASI_XMPP_USER=jigasi

Expand Down Expand Up @@ -288,6 +306,9 @@ JIGASI_PORT_MAX=20050
#GC_CLIENT_ID=
#GC_CLIENT_CERT_URL=

# Controls which logs are written to stdout. Supported java log levels are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
#JIGASI_LOG_LEVEL=INFO

# Enable recording
#ENABLE_RECORDING=1

Expand Down Expand Up @@ -325,6 +346,12 @@ JIBRI_STRIP_DOMAIN_JID=muc
# Directory for logs inside Jibri container
JIBRI_LOGS_DIR=/config/logs

# Controls which logs are written to stdout. Supported java log levels are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
#JIBRI_LOG_LEVEL=INFO

# Controls access logs written to stdout for nginx
#ENABLE_WEB_ACCESS_LOGS=true

# Disable HTTPS: handle TLS connections outside of this setup
#DISABLE_HTTPS=1

Expand Down
3 changes: 3 additions & 0 deletions etherpad.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
etherpad:
image: jitsi/etherpad:latest
restart: ${RESTART_POLICY}
environment:
- ETHERPAD_DISABLE_IP_LOGGING
- ETHERPAD_LOG_LEVEL
networks:
meet.jitsi:
aliases:
Expand Down
4 changes: 2 additions & 2 deletions etherpad/rootfs/defaults/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
/*
* Privacy: disable IP logging
*/
"disableIPlogging" : false,
"disableIPlogging" : "${ETHERPAD_DISABLE_IP_LOGGING:false}",

/*
* Time (in seconds) to automatically reconnect pad when a "Force reconnect"
Expand Down Expand Up @@ -362,7 +362,7 @@
*
* Valid values: DEBUG, INFO, WARN, ERROR
*/
"loglevel": "INFO",
"loglevel": "${ETHERPAD_LOG_LEVEL:INFO}",

/*
* Logging configuration. See log4js documentation for further information:
Expand Down
1 change: 1 addition & 0 deletions jibri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
- JIBRI_FINALIZE_RECORDING_SCRIPT_PATH
- JIBRI_STRIP_DOMAIN_JID
- JIBRI_LOGS_DIR
- JIBRI_LOG_LEVEL
- DISPLAY=:0
- TZ
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion jibri/rootfs/defaults/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"control_muc": {
"domain": "{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}",
"room_name": "{{ .Env.JIBRI_BREWERY_MUC }}",
// MUST be unic for every instanse
// MUST be unic for every instanse
"nickname": "jibri-instanse-{{ .Env.JIBRI_INSTANCE_ID }}"
},
// All participants in a call join a muc so they can exchange
Expand Down
17 changes: 8 additions & 9 deletions jibri/rootfs/defaults/logging.properties
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler

java.util.logging.FileHandler.level = FINE
java.util.logging.FileHandler.level = {{ .Env.JIBRI_LOG_LEVEL | default "FINE" }}
java.util.logging.FileHandler.pattern = {{ .Env.JIBRI_LOGS_DIR }}/log.%g.txt
java.util.logging.FileHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
java.util.logging.FileHandler.count = 10
java.util.logging.FileHandler.limit = 10000000

org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.level = FINE
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.level = {{ .Env.JIBRI_LOG_LEVEL | default "FINE" }}
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.pattern = {{ .Env.JIBRI_LOGS_DIR }}/ffmpeg.%g.txt
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.count = 10
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.limit = 10000000

org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.level = FINE
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.level = {{ .Env.JIBRI_LOG_LEVEL | default "FINE" }}
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.pattern = {{ .Env.JIBRI_LOGS_DIR }}/pjsua.%g.txt
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.count = 10
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.limit = 10000000

org.jitsi.jibri.selenium.util.BrowserFileHandler.level = FINE
org.jitsi.jibri.selenium.util.BrowserFileHandler.level = {{ .Env.JIBRI_LOG_LEVEL | default "FINE" }}
org.jitsi.jibri.selenium.util.BrowserFileHandler.pattern = {{ .Env.JIBRI_LOGS_DIR }}/browser.%g.txt
org.jitsi.jibri.selenium.util.BrowserFileHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
org.jitsi.jibri.selenium.util.BrowserFileHandler.count = 10
org.jitsi.jibri.selenium.util.BrowserFileHandler.limit = 10000000

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.level = {{ .Env.JIBRI_LOG_LEVEL | default "FINE" }}
java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter

org.jitsi.level = FINE
org.jitsi.level = {{ .Env.JIBRI_LOG_LEVEL | default "FINE" }}

org.glassfish.level = INFO
org.osgi.level = INFO
org.glassfish.level = {{ .Env.JIBRI_LOG_LEVEL | default "INFO" }}
org.osgi.level = {{ .Env.JIBRI_LOG_LEVEL | default "INFO" }}
14 changes: 7 additions & 7 deletions jicofo/rootfs/defaults/logging.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
handlers= java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.level = {{ .Env.JICOFO_LOG_LEVEL | default "INFO" }}
java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter

net.java.sip.communicator.util.ScLogFormatter.programname=Jicofo

.level=INFO
net.sf.level=SEVERE
net.java.sip.communicator.plugin.reconnectplugin.level=FINE
org.ice4j.level=SEVERE
org.jitsi.impl.neomedia.level=SEVERE
.level={{ .Env.JICOFO_LOG_LEVEL | default "INFO" }}
net.sf.level={{ .Env.JICOFO_LOG_LEVEL | default "SEVERE" }}
net.java.sip.communicator.plugin.reconnectplugin.level={{ .Env.JICOFO_LOG_LEVEL | default "FINE" }}
org.ice4j.level={{ .Env.JICOFO_LOG_LEVEL | default "SEVERE" }}
org.jitsi.impl.neomedia.level={{ .Env.JICOFO_LOG_LEVEL | default "SEVERE" }}

# Do not worry about missing strings
net.java.sip.communicator.service.resources.AbstractResourcesService.level=SEVERE
net.java.sip.communicator.service.resources.AbstractResourcesService.level={{ .Env.JICOFO_LOG_LEVEL | default "SEVERE" }}

#net.java.sip.communicator.service.protocol.level=ALL

Expand Down
2 changes: 1 addition & 1 deletion jicofo/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [[ ! -f /config/sip-communicator.properties ]]; then
fi

if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
tpl /defaults/logging.properties > /config/logging.properties
fi

chown -R jicofo:jitsi /config
1 change: 1 addition & 0 deletions jigasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ services:
- JIGASI_HEALTH_CHECK_INTERVAL
- JIGASI_SIP_KEEP_ALIVE_METHOD
- JIGASI_ENABLE_SDES_SRTP
- JIGASI_LOG_LEVEL
- ENABLE_TRANSCRIPTIONS
- JIGASI_TRANSCRIBER_ADVERTISE_URL
- JIGASI_TRANSCRIBER_RECORD_AUDIO
Expand Down
16 changes: 8 additions & 8 deletions jigasi/rootfs/defaults/logging.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
handlers= java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
java.util.logging.ConsoleHandler.level={{ .Env.JIGASI_LOG_LEVEL | default "INFO" }}
java.util.logging.ConsoleHandler.formatter=net.java.sip.communicator.util.ScLogFormatter

net.java.sip.communicator.util.ScLogFormatter.programname=Jigasi

.level=INFO
net.sf.level=SEVERE
net.java.sip.communicator.plugin.reconnectplugin.level=FINE
org.ice4j.level=SEVERE
org.jitsi.impl.neomedia.level=SEVERE
.level={{ .Env.JIGASI_LOG_LEVEL | default "INFO" }}
net.sf.level={{ .Env.JIGASI_LOG_LEVEL | default "SEVERE" }}
net.java.sip.communicator.plugin.reconnectplugin.level={{ .Env.JIGASI_LOG_LEVEL | default "FINE" }}
org.ice4j.level={{ .Env.JIGASI_LOG_LEVEL | default "SEVERE" }}
org.jitsi.impl.neomedia.level={{ .Env.JIGASI_LOG_LEVEL | default "SEVERE" }}

# Do not worry about missing strings
net.java.sip.communicator.service.resources.AbstractResourcesService.level=SEVERE
net.java.sip.communicator.service.resources.AbstractResourcesService.level={{ .Env.JIGASI_LOG_LEVEL | default "SEVERE" }}

#net.java.sip.communicator.service.protocol.level=ALL

2 changes: 1 addition & 1 deletion jigasi/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [[ ! -f /config/sip-communicator.properties ]]; then
fi

if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
tpl /defaults/logging.properties > /config/logging.properties
fi

mkdir -pm777 /tmp/transcripts
Expand Down
10 changes: 5 additions & 5 deletions jvb/rootfs/defaults/logging.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
handlers= java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
java.util.logging.ConsoleHandler.level={{ .Env.JVB_LOG_LEVEL | default "INFO" }}
java.util.logging.ConsoleHandler.formatter=net.java.sip.communicator.util.ScLogFormatter

net.java.sip.communicator.util.ScLogFormatter.programname=JVB

.level=INFO
.level={{ .Env.JVB_LOG_LEVEL | default "INFO" }}

org.jitsi.videobridge.xmpp.ComponentImpl.level=FINE
org.jitsi.videobridge.xmpp.ComponentImpl.level={{ .Env.JVB_LOG_LEVEL | default "FINE" }}

# All of the INFO level logs from MediaStreamImpl are unnecessary in the context of jitsi-videobridge.
org.jitsi.impl.neomedia.MediaStreamImpl.level=WARNING
org.jitsi.impl.neomedia.MediaStreamImpl.level={{ .Env.JVB_LOG_LEVEL | default "WARNING" }}

2 changes: 1 addition & 1 deletion jvb/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi
tpl /defaults/jvb.conf > /config/jvb.conf

if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
tpl /defaults/logging.properties > /config/logging.properties
fi

chown -R jvb:jitsi /config
2 changes: 1 addition & 1 deletion prosody/rootfs/defaults/prosody.cfg.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $LOG_LEVEL := .Env.LOG_LEVEL | default "info" }}
{{ $LOG_LEVEL := .Env.PROSODY_LOG_LEVEL | default "info" }}

-- Prosody Example Configuration File
--
Expand Down
8 changes: 7 additions & 1 deletion web/rootfs/defaults/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ $ENABLE_ACCESS_LOGS := .Env.ENABLE_WEB_ACCESS_LOGS | default "1" | toBool }}

user www-data;
worker_processes 4;
pid /run/nginx.pid;
Expand Down Expand Up @@ -39,7 +41,11 @@ http {
# Logging Settings
##

{{ if .ENABLE_ACCESS_LOGS }}
access_log /dev/stdout;
{{ else }}
access_log off;
{{ end }}
error_log /dev/stderr;

##
Expand All @@ -61,7 +67,7 @@ http {
##
# Virtual Host Configs
##
include /config/nginx/site-confs/*;
include /config/nginx/site-confs/*;
}


Expand Down

0 comments on commit 942bd17

Please sign in to comment.