Where should I put logging.properties file for java.util.logging in web application (maven project)?

前端 未结 4 1899
天命终不由人
天命终不由人 2021-02-13 22:59

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.

4条回答
  •  太阳男子
    2021-02-13 23:13

    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.

提交回复
热议问题