I'll paste in my tinylog.properties below. The file structure is this:
/project/
/project/src/main/resources/tinylog.properties
/project/logs/debug/
/project/logs/error/
The properies:
writer = rolling file
writer.file = logs/debug/debug_{date: yyyy-MM-dd}_{count}.log
writer.charset = UTF-8
writer.buffered = true
writer.backups = 100
writer.convert = gzip
writingthread = true
writer.level = debug
writer.format = {date: HH:mm:ss.SSS} {class}.{method}() {level}: {message}
writer = rolling file
writer.file = logs/error/error_{date: yyyy-MM-dd}_{count}.log
writer.charset = UTF-8
writer.buffered = true
writer.backups = 100
writer.convert = gzip
writingthread = true
writer.level = error
writer.format = {date: HH:mm:ss.SSS} {class}.{method}() {level}: {message}
There are plenty of Logger.debug statements and a few Logger.error lines in the code. Even though no error fired, an error.log file is made. Many Logger.debug statements had to fire, but no debug.log was made. I'm confused. Thanks in advance for ideas.
I ran the system with a variety of tinylog.properties ideas, the latest being reflected in the tinylog examples.
Someone in a closed tinylog issue put properties in main/java/tinylog.properties. I now have it in both. No change.
As JackPark mentioned, all writer keys must be unique to meet the properties file standard. Otherwise you overwrite existing writer settings.
The correct properties file would be:
This is as designed as tinylog creates the log files already at startup to ensure that the filesystem is writable.