-3

I am trying to use tinylog with netbeans. I have some questions regarding that:

  1. How to configure tinylog using a property file for netbeans maven web application.

  2. How to get logs in JSON format.

  3. If I have more than one writers configured then How can I log to only a certain writer and skip other writers.

joschi
  • 12,746
  • 4
  • 44
  • 50
Rahul khandelwal
  • 331
  • 3
  • 14
  • 1
    your configuration is (should) not be dependent on the IDE you use.a simple google search on 'Java Tinylog netbeans' lead me to this: http://www.tinylog.org/configuration – Stultuske Jul 25 '16 at 06:38
  • @Stultuske, At tinylog site they have mentioned that configuration file should be kept in src directory, but it didn't work for me. As of now I am configuring tinylog using hardcoded file path. – Rahul khandelwal Jul 25 '16 at 08:49
  • In case of maven project (regardless of the IDE), you should put `tinylog.properties` file into `src/main/resources` folder. See [Maven project structure](https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html) - non-java code, such as a property file, is called a resource in maven terminology. – OndroMih Jul 26 '16 at 17:34

1 Answers1

1

Answer for the first question:

In case of maven project (regardless of the IDE), you should put tinylog.properties file into src/main/resources folder. See Maven project structure - non-java code, such as a property file, is called a resource in maven terminology.

OndroMih
  • 7,280
  • 1
  • 26
  • 44