Project

General

Profile

How to enable only particular level of logs?

Igor Khomenko
Added about 4 years ago

Is there a way to enable only particular level of logs?

I got this this link http://docs.tigase.org/tigase-server/5.2.3/admin_guide/html/#_old_way_editing_configuration_file_manually

but not sure that file tigase-config.xml is still actual and can be used


Replies (9)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

You are correct - xml configuration is obsolete. But you are still able to configure logger levels from init.properties, for example.:

basic-conf/logging/tigase.db.level=FINEST
basic-conf/logging/tigase.server.level=FINE

Added by Igor Khomenko about 4 years ago

Thanks

Is there a full documentation somewhere in Tigase Administration guide? If not - would be great to add

Another question - is there an explanation of all log levels? where to use FINE, where INFO etc

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Igor Khomenko wrote:

Is there a full documentation somewhere in Tigase Administration guide? If not - would be great to add

Unfortunately it's not explicitly documented for the moment. We are constantly improving docs so it will definitely be added :-)

Another question - is there an explanation of all log levels? where to use FINE, where INFO etc

They follow Java's Logger Level The difference is simply detail of created logs. In principle everything above FINE (inclusive) will produce quite detailed debug with lots of information about processing of each packet.

Added by Igor Khomenko almost 4 years ago

Is it possible to set not only one level, but for example 2 like this?

basic-conf/logging/tigase.db.level=FINEST,FINE

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

No, it's not possible.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam almost 4 years ago

Igor, as Wojciech said it is not possible but also not necessary. If you set logging level to FINEST it also includes all log records generated on higher levels (FINER, FINE, INFO, WARNING, SEVERE).

Added by Igor Khomenko almost 4 years ago

Thanks, that makes sense,

so if I would like to track only SEVERE and WARNING then set to WARNING will do that

thanks

Added by Igor Khomenko almost 4 years ago

I have also a question how to configure this for custom packages

let's say I have next:

--debug-packages=com.api.services

how to set log level for this package?

will it be something like this?

basic-conf/logging/com.api.services.level=WARNING

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Yes, that's the exact configuration. The distinction between --debug and --debug-packages is that the former helps you avoid typing each time tigase. package as it's intended more for internal debugging.

    (1-9/9)