Using tinylog with two console writers in parallel

You can use tags (https://tinylog.org/v2/configuration/#tags):

Configuration.set("writer1", "console");
Configuration.set("writer1.tag", "A, B");
Configuration.set("writer1.format", "{class-name}: {message}");

Configuration.set("writer2", "console");
Configuration.set("writer2.tag", "C");
Configuration.set("writer2.format", "{level}: {message}");

Tagged loggers can be created via TaggedLogger logger = Logger.tag("A").

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top