Overide logging + some doc to debug java processes

This commit is contained in:
Quentin 2021-01-31 15:47:01 +01:00
parent 09e1e641a7
commit a3f62d1f30
4 changed files with 65 additions and 4 deletions

View file

@ -11,9 +11,10 @@ Several server components:
- etc. - etc.
Some libs: Some libs:
- libjitsi - libjitsi seems deprecated
- jicoco - jicoco contains some parent classes to handle Jitsi's Configuration
- jitsi-utils - [jitsi-utils](https://github.com/jitsi/jitsi-utils) contains the Logger definition for example
- [ice4j](https://github.com/jitsi/ice4j) contains jitsi's implementation of WebRTC
- etc. - etc.
Client components: Client components:
@ -62,6 +63,14 @@ instead, we should look at this one: https://github.com/jitsi/jitsi-meet/blob/ma
Jitsi can be configured to authenticated through tokens, Jitsi can be configured to authenticated through tokens,
the postinst file is here: https://github.com/jitsi/jitsi-meet/blob/master/debian/jitsi-meet-tokens.postinst the postinst file is here: https://github.com/jitsi/jitsi-meet/blob/master/debian/jitsi-meet-tokens.postinst
## Remote debug
Add this parameter to the java process you want to debug (either jicofo or jvb). It must be added by modifying the entrypoint script, next to the respective Dockerfile of each container.
```
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
```
## Resources to understand jitsi ## Resources to understand jitsi
- [jicofo/debian/postinst](https://github.com/jitsi/jicofo/blob/master/debian/postinst) - [jicofo/debian/postinst](https://github.com/jitsi/jicofo/blob/master/debian/postinst)

View file

@ -25,6 +25,7 @@ services:
- "./prosody/certs/jitsi.crt:/usr/local/share/ca-certificates/jitsi.crt:ro" - "./prosody/certs/jitsi.crt:/usr/local/share/ca-certificates/jitsi.crt:ro"
- "./prosody/certs/auth.jitsi.crt:/usr/local/share/ca-certificates/auth.jitsi.crt:ro" - "./prosody/certs/auth.jitsi.crt:/usr/local/share/ca-certificates/auth.jitsi.crt:ro"
- "./jvb/videobridge.conf:/etc/jitsi/videobridge.conf:ro" - "./jvb/videobridge.conf:/etc/jitsi/videobridge.conf:ro"
- "./jvb/logging.properties:/usr/share/jvb/lib/logging.properties:ro"
environment: environment:
- JITSI_NAT_LOCAL_IP=10.64.82.33 - JITSI_NAT_LOCAL_IP=10.64.82.33
- JITSI_NAT_PUBLIC_IP=212.47.253.12 - JITSI_NAT_PUBLIC_IP=212.47.253.12

View file

@ -0,0 +1,51 @@
handlers= java.util.logging.ConsoleHandler
#handlers= java.util.logging.ConsoleHandler, com.agafua.syslog.SyslogHandler
#handlers= java.util.logging.ConsoleHandler, io.sentry.jul.SentryHandler
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter
net.java.sip.communicator.util.ScLogFormatter.programname=JVB
#.level=INFO # default
.level=FINE
# Added by quentin
#org.jitsi.videobridge.ice.level=FINE
#org.ice4j.level=FINE
org.ice4j.stack.Connector=FINEST
org.jitsi.videobridge.transport.ice=FINEST
org.jitsi.videobridge.xmpp.ComponentImpl.level=FINE
# All of the INFO level logs from MediaStreamImpl are unnecessary in the context of jitsi-videobridge.
org.jitsi.impl.neomedia.MediaStreamImpl.level=WARNING
# Syslog (uncomment handler to use)
com.agafua.syslog.SyslogHandler.transport = udp
com.agafua.syslog.SyslogHandler.facility = local0
com.agafua.syslog.SyslogHandler.port = 514
com.agafua.syslog.SyslogHandler.hostname = localhost
com.agafua.syslog.SyslogHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter
com.agafua.syslog.SyslogHandler.escapeNewlines = false
# Sentry (uncomment handler to use)
io.sentry.jul.SentryHandler.level=WARNING
# to disable double timestamps in syslog uncomment next line
#net.java.sip.communicator.util.ScLogFormatter.disableTimestamp=true
# time series logging
java.util.logging.SimpleFormatter.format= %5$s%n
java.util.logging.FileHandler.level = ALL
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.pattern = /tmp/jvb-series.log
java.util.logging.FileHandler.limit = 200000000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.append = false
timeseries.level=OFF
timeseries.org.jitsi.videobridge.cc.allocation.BitrateAllocator.level=ALL
timeseries.useParentHandlers = false
# time series logging is disabled by default. Uncomment the line below to enable it.
#timeseries.handlers = java.util.logging.FileHandler

View file

@ -233,7 +233,7 @@ videobridge {
enabled = true enabled = true
# The port to bind to for ICE/TCP. # The port to bind to for ICE/TCP.
port = 8080 port = 8089
# An optional additional port to advertise. # An optional additional port to advertise.
# mapped-port = 8443 # mapped-port = 8443