[jitsi-dev] how to set debug level log in jitsi


#1

Hi,

I'm working with source code of jitsi and I would like to debug the
performance of jitsi client. How could I change the level log in jitsi?

Thanks in advance

Pedro


#2

Hi Pedro,

In the lib/logging.properties you can change global log level or define one per package.

Cheers,
Yana

···

On Mar 15, 2012, at 5:33 PM, Pedro Moreno wrote:

Hi,

I'm working with source code of jitsi and I would like to debug the
performance of jitsi client. How could I change the level log in jitsi?

Thanks in advance

Pedro


#3

Hi Yana,
Yesterday I modified the logging.properties but I had no success. The
content of my logging properties is the following:

···

############################################################
# Default Logging Configuration File
#
# You can use a different file by specifying a filename
# with the java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################

############################################################
# Global properties
############################################################

# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
handlers= net.java.sip.communicator.util.FileHandler,
java.util.logging.ConsoleHandler

# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler

# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
#.level= FINEST
.level= DEBUG

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

# default file output is in user's home directory.
net.java.sip.communicator.util.FileHandler.limit = 5000000
net.java.sip.communicator.util.FileHandler.count = 3
net.java.sip.communicator.util.FileHandler.formatter =
net.java.sip.communicator.util.ScLogFormatter
net.java.sip.communicator.util.FileHandler.level = DEBUG

# Limit the message that are printed on the console to FINEST and above
(all).
java.util.logging.ConsoleHandler.level = SEVERE
java.util.logging.ConsoleHandler.formatter =
net.java.sip.communicator.util.ScLogFormatter

############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

# We don't want trace logs from joscar and joustsim
net.kano.level = INFO

# We don't want trace logs from java-jml
net.sf.cindy.impl.level = INFO

# But we want everything coming from the sip-comm

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.xyz.foo.level = SEVERE
sun.awt.level = INFO
java.awt.level = INFO
javax.swing.level = INFO

Is the content right if I want to establish a debug level? Should I modified
any other file like build.xml or something like that?

Thanks

Regards
-----Mensaje original-----
De: Yana Stamcheva [mailto:yana@jitsi.org]
Enviado el: viernes, 16 de marzo de 2012 10:57
Para: dev@jitsi.java.net
Asunto: [jitsi-dev] Re: how to set debug level log in jitsi

Hi Pedro,

In the lib/logging.properties you can change global log level or define one
per package.

Cheers,
Yana

On Mar 15, 2012, at 5:33 PM, Pedro Moreno wrote:

Hi,

I'm working with source code of jitsi and I would like to debug the
performance of jitsi client. How could I change the level log in jitsi?

Thanks in advance

Pedro


#4

Hi Pedro,

You could put the global level to .level= FINEST. Also, as explained in the global level comment, you may want to change the ConsoleHandler level from SEVERE to FINEST too, so that you could see log messages printed in the console.

java.util.logging.ConsoleHandler.level = SEVERE

If you're interested only in specifique events it would probably be better to only add the package you're interested in, like for example:

net.java.sip.communicator.impl.protocol.sip.level = FINEST

Hope this helps,
Yana

···

On Mar 16, 2012, at 1:18 PM, Pedro Moreno wrote:

Hi Yana,
Yesterday I modified the logging.properties but I had no success. The
content of my logging properties is the following:

############################################################
# Default Logging Configuration File
#
# You can use a different file by specifying a filename
# with the java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################

############################################################
# Global properties
############################################################

# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
handlers= net.java.sip.communicator.util.FileHandler,
java.util.logging.ConsoleHandler

# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler

# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
#.level= FINEST
.level= DEBUG

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

# default file output is in user's home directory.
net.java.sip.communicator.util.FileHandler.limit = 5000000
net.java.sip.communicator.util.FileHandler.count = 3
net.java.sip.communicator.util.FileHandler.formatter =
net.java.sip.communicator.util.ScLogFormatter
net.java.sip.communicator.util.FileHandler.level = DEBUG

# Limit the message that are printed on the console to FINEST and above
(all).
java.util.logging.ConsoleHandler.level = SEVERE
java.util.logging.ConsoleHandler.formatter =
net.java.sip.communicator.util.ScLogFormatter

############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

# We don't want trace logs from joscar and joustsim
net.kano.level = INFO

# We don't want trace logs from java-jml
net.sf.cindy.impl.level = INFO

# But we want everything coming from the sip-comm

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.xyz.foo.level = SEVERE
sun.awt.level = INFO
java.awt.level = INFO
javax.swing.level = INFO

Is the content right if I want to establish a debug level? Should I modified
any other file like build.xml or something like that?

Thanks

Regards
-----Mensaje original-----
De: Yana Stamcheva [mailto:yana@jitsi.org]
Enviado el: viernes, 16 de marzo de 2012 10:57
Para: dev@jitsi.java.net
Asunto: [jitsi-dev] Re: how to set debug level log in jitsi

Hi Pedro,

In the lib/logging.properties you can change global log level or define one
per package.

Cheers,
Yana

On Mar 15, 2012, at 5:33 PM, Pedro Moreno wrote:

Hi,

I'm working with source code of jitsi and I would like to debug the
performance of jitsi client. How could I change the level log in jitsi?

Thanks in advance

Pedro


#5

Hi Yana,
Question solved, I put FINEST in .level, and I get the debug messages in the
log file
Thanks a lot
Pedro

···

-----Mensaje original-----
De: Yana Stamcheva [mailto:yana@jitsi.org]
Enviado el: viernes, 16 de marzo de 2012 12:33
Para: dev@jitsi.java.net
Asunto: [jitsi-dev] Re: how to set debug level log in jitsi

Hi Pedro,

You could put the global level to .level= FINEST. Also, as explained in the
global level comment, you may want to change the ConsoleHandler level from
SEVERE to FINEST too, so that you could see log messages printed in the
console.

java.util.logging.ConsoleHandler.level = SEVERE

If you're interested only in specifique events it would probably be better
to only add the package you're interested in, like for example:

net.java.sip.communicator.impl.protocol.sip.level = FINEST

Hope this helps,
Yana

On Mar 16, 2012, at 1:18 PM, Pedro Moreno wrote:

Hi Yana,
Yesterday I modified the logging.properties but I had no success. The
content of my logging properties is the following:

############################################################
# Default Logging Configuration File
#
# You can use a different file by specifying a filename # with the
java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################

############################################################
# Global properties
############################################################

# "handlers" specifies a comma separated list of log Handler #
classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only #
show messages at the INFO and above levels.
handlers= net.java.sip.communicator.util.FileHandler,
java.util.logging.ConsoleHandler

# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler,
java.util.logging.ConsoleHandler

# Default global logging level.
# This specifies which kinds of events are logged across # all
loggers. For any given facility this global level # can be overriden
by a facility specific level # Note that the ConsoleHandler also has a
separate level # setting to limit messages printed to the console.
#.level= FINEST
.level= DEBUG

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

# default file output is in user's home directory.
net.java.sip.communicator.util.FileHandler.limit = 5000000
net.java.sip.communicator.util.FileHandler.count = 3
net.java.sip.communicator.util.FileHandler.formatter =
net.java.sip.communicator.util.ScLogFormatter
net.java.sip.communicator.util.FileHandler.level = DEBUG

# Limit the message that are printed on the console to FINEST and
above (all).
java.util.logging.ConsoleHandler.level = SEVERE
java.util.logging.ConsoleHandler.formatter =
net.java.sip.communicator.util.ScLogFormatter

############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

# We don't want trace logs from joscar and joustsim net.kano.level =
INFO

# We don't want trace logs from java-jml net.sf.cindy.impl.level =
INFO

# But we want everything coming from the sip-comm

# For example, set the com.xyz.foo logger to only log SEVERE #
messages:
com.xyz.foo.level = SEVERE
sun.awt.level = INFO
java.awt.level = INFO
javax.swing.level = INFO

Is the content right if I want to establish a debug level? Should I
modified any other file like build.xml or something like that?

Thanks

Regards
-----Mensaje original-----
De: Yana Stamcheva [mailto:yana@jitsi.org] Enviado el: viernes, 16 de
marzo de 2012 10:57
Para: dev@jitsi.java.net
Asunto: [jitsi-dev] Re: how to set debug level log in jitsi

Hi Pedro,

In the lib/logging.properties you can change global log level or
define one per package.

Cheers,
Yana

On Mar 15, 2012, at 5:33 PM, Pedro Moreno wrote:

Hi,

I'm working with source code of jitsi and I would like to debug the
performance of jitsi client. How could I change the level log in jitsi?

Thanks in advance

Pedro