How to use or where to place TinyLog properties file with Maven InteliJ

248 views Asked by At

According to the TinyLog website

The properties file should be named "tinylog.properties" and placed in the default package. In common IDEs like Eclipse and Netbeans, it is sufficient to put "tinylog.properties" into the "src/" folder or for Maven based projects into "src/main/resources".

The answer to this question also suggests this should be the location of the properties file.

The TinyLog website also shows the following as an example to use in the properties file:

tinylog.level = warning

The path of my properties file is src/main/resources/tinylog.properties. The content is:

tinylog.level = warning

However, trace and info prints continue to be created, and isTraceEnabled() still returns true.

I assume the location of my properties file is wrong, but as far as I can tell it is in the correct location.

1

There are 1 answers

0
Martin On BEST ANSWER

The cause for your problem is that you are using tinylog 2 with configuration syntax of legacy tinylog 1. You can find the configuration documentation for tinylog 2 here: https://tinylog.org/v2/configuration/

In your case, the tinylog 2 configuration syntax for tinylog.properties will be:

level = warn