I want to logging to file and set it in properties file, because default logger.info() output goes to console and in web application there is no console in my case.
By default, the logging. properties file is located in the /user/bdd/edp/lib directory. The hdfsEdpLibPath property in the data_processing_CLI file controls the location of this file in HDFS. A comma-delimited list of handler class names that are added to the root Logger.
The process of creating a new Logger in Java is quite simple. You have to use Logger. getLogger() method. The getLogger() method identifies the name of the Logger and takes string as a parameter.
As Navi says... it goes in src/main/resources
Just to clarify this subject... the logging.properties must go in WEB-INF/classes
directory.
If you are using some kind of framework for organizing your project, you must find out where to place the file in order to stay in WEB-INF/classes
If you are using maven to organize the web app, you must know that everything that lies in src/main/resources
goes to WEB-INF/classes.
you should put in src/main/resources
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With