Andreas Dhyan
Andreas Dhyan

Reputation: 1

How to configure tinylog with rolling files in java using Netbeans or Eclipse?

I'm using the tinylog in version 2.6.2 in Java Native Using IDE Netbeans.

This is my tinylog.properties file:

# Set up the rolling file appender
writer1 = rolling file
writer1.file = logs/SWI-{date:yyyy-MM-dd}.log
writer1.policies = daily

# Set up the console appender
writer2 = console

# Specify log format for both appenders
writer1.format = {date: HH:mm:ss} [{thread}] {level}: {class}.{method}() - {message}
writer2.format = {date: HH:mm:ss} [{thread}] {level}: {class}.{method}() - {message}

# Set log level for both appenders
writer1.level = trace
writer2.level = trace

Here is my Folder tree

My Folder Tree

enter image description here

Idk what's wrong with my tinylog. even I create my own logs folder in my project. However, I can see some log in console.

Upvotes: 0

Views: 68

Answers (1)

Martin
Martin

Reputation: 716

As I can see in the screenshot, you use a plain IDE project without any common build tool. Therefore, you can put tinylog.properties directly in your src folder without any sub folders.

Upvotes: 0

Related Questions