I tried implementing the below mentioned code in my system. I'm getting a error like:
LOGGER ERROR: Invalid charset: UTF-8
LOGGER ERROR: Illegal severity level: error
`writer3 = json
writer3.level = error
writer3.file = logs/log-{count}.json
writer3.field.level = level
writer3.field.source = {class}.{method}()
writer3.field.message = message
writer3.charset = UTF-8
writer3.append = true
writer3.buffered = true`
The cause for the errors are the white space at the end of the lines in
writer3.level = error
andwriter3.charset = UTF-8
. Just remove all spaces and tabs behinderror
andUTF-8
. Afterwards, the JSON writer will work without any errors :)PS: In the next version of tinylog 2.4, the logging framework will trim such whitespace automatically.