misc: add support for sentry logging

This commit is contained in:
Paul Tiedtke
2021-04-16 20:34:33 +02:00
committed by GitHub
parent 3d93f2b37a
commit 8d2a29f286
9 changed files with 45 additions and 14 deletions

View File

@@ -1,4 +1,8 @@
{{ if .Env.SENTRY_DSN }}
handlers=java.util.logging.ConsoleHandler,io.sentry.jul.SentryHandler
{{ else }}
handlers= java.util.logging.ConsoleHandler
{{ end }}
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
@@ -6,9 +10,8 @@ java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLo
net.java.sip.communicator.util.ScLogFormatter.programname=JVB
.level=INFO
org.jitsi.videobridge.xmpp.ComponentImpl.level=FINE
io.sentry.jul.SentryHandler.level=WARNING
# All of the INFO level logs from MediaStreamImpl are unnecessary in the context of jitsi-videobridge.
org.jitsi.impl.neomedia.MediaStreamImpl.level=WARNING

View File

@@ -1,6 +1,7 @@
#!/usr/bin/with-contenv bash
export LOCAL_ADDRESS=$(ip addr show dev "$(ip route|awk '/^default/ { print $5 }')" | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jitsi-videobridge2 | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}"
if [[ -z $JVB_AUTH_PASSWORD ]]; then
echo 'FATAL ERROR: JVB auth password must be set'
@@ -18,10 +19,7 @@ if [[ -f /config/custom-sip-communicator.properties ]]; then
cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties
fi
tpl /defaults/logging.properties > /config/logging.properties
tpl /defaults/jvb.conf > /config/jvb.conf
if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
fi
chown -R jvb:jitsi /config