Skip to content

Commit

Permalink
support finer nginx logs
Browse files Browse the repository at this point in the history
  • Loading branch information
flecno committed Apr 17, 2020
1 parent 5bc5bd8 commit 2164d75
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ Variable | Description | Default value
`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
`WEB_LOG_LEVEL` | Controls nginx logs written to stdout. INFO enables access logs, ERROR the error logs and OFF disables all (but [`emerg` level](https://nginx.org/en/docs/ngx_core_module.html#error_log) for error logs) | INFO
`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

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
- JIBRI_RECORDER_USER
- JIBRI_RECORDER_PASSWORD
- ENABLE_RECORDING
- ENABLE_WEB_ACCESS_LOGS
- WEB_LOG_LEVEL
networks:
meet.jitsi:
aliases:
Expand Down
8 changes: 2 additions & 6 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@ JVB_TCP_PORT=4443
# 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 Down Expand Up @@ -334,9 +331,8 @@ 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

# Controls ngins logs written to stdout. INFO enables access logs, ERROR the error logs and OFF disables all but 'emerg' level for error logs
#WEB_LOG_LEVEL=INFO
# Disable HTTPS: handle TLS connections outside of this setup
#DISABLE_HTTPS=1

Expand Down
13 changes: 9 additions & 4 deletions web/rootfs/defaults/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $ENABLE_ACCESS_LOGS := .Env.ENABLE_WEB_ACCESS_LOGS | default "1" | toBool }}
{{ $LOG_LEVEL := .Env.WEB_LOG_LEVEL | default "INFO" }}

user www-data;
worker_processes 4;
Expand Down Expand Up @@ -35,12 +35,17 @@ http {
# Logging Settings
##

{{ if .ENABLE_ACCESS_LOGS }}
{{ if (eq $LOG_LEVEL "INFO") }}
access_log /dev/stdout;
{{ else }}
error_log /dev/stderr;
{{ else if (eq $LOG_LEVEL "ERROR")}}
access_log off;
{{ end }}
error_log /dev/stderr;
{{ else if (eq $LOG_LEVEL "OFF")}}
access_log off;
error_log /dev/stderr emerg;
{{ end }}


##
# Gzip Settings
Expand Down

0 comments on commit 2164d75

Please sign in to comment.