Issue
I am writing an Eclipse plugin and want to use tinylog in my plugin code. I tried this:
1). modified Eclipse config file (eclipse.ini) to add this line:
-Dtinylog.configuration=C:\eclipse-cpp-2018-09-win32-x86_64\eclipse\tinylog.properties
2). content of tinylog.properties:
writer = file
writer.level = debug
writer.file = C:\eclipse-cpp-2018-09-win32-x86_64\eclipse\log.txt
writer.charset = UTF-8
writer.append = true
writer.buffered = true
After launching Eclipse and run my plugin, I couldn't see log.txt
BTW, my tinylog version is of 1.3.6
Solution
You are using tinylog 1 with a configuration for tinylog 2. The correct configuration for tinylog 1.3.6 would be:
tinylog.writer = file
tinylog.writer.level = debug
tinylog.writer.filename = C:\eclipse-cpp-2018-09-win32-x86_64\eclipse\log.txt
tinylog.writer.buffered = true
tinylog.writer.append = true
In tinylog 1.3.6, the charset cannot be defined in the configuration. Instead, tinylog 1 will use the default charset for your system. The manual for tinylog 1 can be found here: https://tinylog.org/v1/configuration
Update: I just uploaded a working minimal example project on GitHub: https://github.com/pmwmedia/tinylog-eclipse-plugin-example. It contains an Eclipse plug-in that uses tinylog 1.3.6 as logging framework.
Answered By - Martin
Answer Checked By - David Marino (JavaFixing Volunteer)