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 Apr 13, 2020
1 parent 7fd7e2b commit c7cc8a3
Show file tree
Hide file tree
Showing 18 changed files with 94 additions and 40 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,22 @@ Variable | Description | Example

For setting the Google Cloud Credentials please read https://cloud.google.com/text-to-speech/docs/quickstart-protocol section "Before you begin" paragraph 1 to 5.

### Access and Application logging

For privacy reasons it is important to have the possibility to disable all logs about the users. To achieve this you can configure the log level for each component with these options:

Variable | Description | Default value
--- | --- | ---
`PROSODY_LOG_LEVEL` | Controls which logs are output from prosody and associated modules. [Supported levels](https://prosody.im/doc/logging) | info
`JVB_LOG_LEVEL` | Controls which logs are written to stdout. [Supported java log levels](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html) | INFO
`JICOFO_LOG_LEVEL` | Controls which logs are written to stdout. [Supported java log levels](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html) | INFO
`JIGASI_LOG_LEVEL` | Controls which logs are written to stdout. [Supported java log levels](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html) | INFO
`JIBRI_LOG_LEVEL` | Controls which logs are written to stdout. [Supported java log levels](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html) | INFO
`ENABLE_WEB_ACCESS_LOGS` | Controls access logs written to stdout for nginx | true
`ETHERPAD_DISABLE_IP_LOGGING` | Disable IP logging | false
`ETHERPAD_LOG_LEVEL` | Controls which logs are written to stdout. Supported levels: DEBUG, INFO, WARN, ERROR | INFO


### Advanced configuration

These configuration options are already set and generally don't need to be changed.
Expand Down Expand Up @@ -433,7 +449,6 @@ Variable | Description | Default value
`JIGASI_TRANSCRIBER_ADVERTISE_URL` | Jigasi will post an URL to the chat with transcription file | true
`DISABLE_HTTPS` | Handle TLS connections outside of this setup | 1
`ENABLE_HTTP_REDIRECT` | Redirect HTTP traffic to HTTPS (necessary for Let's Encrypt) | 1
`LOG_LEVEL` | Controls which logs are output from prosody and associated modules | info

### Running behind NAT or on a LAN environment

Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ services:
- JIBRI_RECORDER_USER
- JIBRI_RECORDER_PASSWORD
- ENABLE_RECORDING
- ENABLE_WEB_ACCESS_LOGS
networks:
meet.jitsi:
aliases:
Expand Down Expand Up @@ -100,7 +101,7 @@ services:
- JWT_ALLOW_EMPTY
- JWT_AUTH_TYPE
- JWT_TOKEN_AUTH_MODULE
- LOG_LEVEL
- PROSODY_LOG_LEVEL
- TZ
networks:
meet.jitsi:
Expand Down Expand Up @@ -128,6 +129,7 @@ services:
- JIGASI_SIP_URI
- JIBRI_BREWERY_MUC
- JIBRI_PENDING_TIMEOUT
- JICOFO_LOG_LEVEL
- TZ
depends_on:
- prosody
Expand Down Expand Up @@ -156,6 +158,7 @@ services:
- JVB_TCP_PORT
- JVB_STUN_SERVERS
- JVB_ENABLE_APIS
- JVB_LOG_LEVEL
- TZ
depends_on:
- prosody
Expand Down
26 changes: 26 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ TZ=Europe/Amsterdam
# Set etherpad-lite URL (uncomment to enable)
#ETHERPAD_URL_BASE=http://etherpad.meet.jitsi:9001

# 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 @@ -200,6 +205,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 @@ -220,13 +228,22 @@ JVB_TCP_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

# Base URL of Jicofo's reservation REST API
#JICOFO_RESERVATION_REST_BASE_URL=http://reservation.example.com

# 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 @@ -274,6 +291,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 @@ -311,6 +331,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
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.JIBRI_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.JIBRI_LOG_LEVEL | default "INFO" }}
net.sf.level={{ .Env.JIBRI_LOG_LEVEL | default "SEVERE" }}
net.java.sip.communicator.plugin.reconnectplugin.level={{ .Env.JIBRI_LOG_LEVEL | default "FINE" }}
org.ice4j.level={{ .Env.JIBRI_LOG_LEVEL | default "SEVERE" }}
org.jitsi.impl.neomedia.level={{ .Env.JIBRI_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.JIBRI_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.JIGASI_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.JIGASI_LOG_LEVEL | default "INFO" }}

org.jitsi.videobridge.xmpp.ComponentImpl.level=FINE
org.jitsi.videobridge.xmpp.ComponentImpl.level={{ .Env.JIGASI_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.JIGASI_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 @@ -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

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 @@ -33,7 +35,11 @@ http {
# Logging Settings
##

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

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


Expand Down
2 changes: 1 addition & 1 deletion web/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fi

# copy config files
if [[ ! -f /config/nginx/nginx.conf ]]; then
cp /defaults/nginx.conf /config/nginx/nginx.conf
tpl /defaults/nginx.conf /config/nginx/nginx.conf
fi

if [[ ! -f /config/nginx/meet.conf ]]; then
Expand Down

0 comments on commit c7cc8a3

Please sign in to comment.