-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log file not getting generated after migrating to java 17 #852
Comments
@ravadisagarrao Please add a status listener as shown below and report back the results here.
|
@ceki , Thanks for quick turn around, tried above status listener but still not able to generate log file. |
@ravadisagarrao Can you include the resulting status output? |
Verified in Tomee startup logs, status output is not found. Do let me know if you need any more info. |
@ravadisagarrao It looks like your logback.xml configuration file is not picked up at all. Adding the "logback.statusListenerClass" system property with "java -Dlogback.statusListenerClass=stdout" might help see the status messages. However, this assumes that slf4j finds logback. Are you using slf4j and if so which version? |
@ceki, I have set as below in setenv.bat file. set CATALINA_OPTS=%CATALINA_OPTS% "-Dpassport.properties.dir.cmd=C:\emcd" is this correct? If yes still not seeing status messages. If NO could you please let me know how and where can i add it. And I am using slf4j version:2.0.13 |
Try
Also, what is the output of SLF4J? Search for lines starting with SLF4J(x) on stdout, x being any of the letters D,I,W or E. I suggest upgrading to slf4j version 2.0.16 and adding the following to CATALINA_OPTS
|
|
Are you trying to use slf4j/logback for TomEE or for web-application's logging? Where are you placing slf4j and logback jar files? Is it in your application's EAR/WAR file or in TomEE's lib folder? Also if you are using slf4j 2.0.16, then I recommend using the latest logback version. |
We are using logback for web app's logging. We placed logback jar files inside WAR file and SLF4j-api is placed in both WAR and Tomee lib folder. |
There is no need to place slf4j-api.jar in TomEE's lib folder if logback jar files are not next to it. At this stage, I would thus recommend removing slf4j-api.jar file from TomEE's lib folder. However, it is quite strange that no messages are emitted by SLF4J. |
Finally, its working now. After freshly checking out code and rebuilt with upgraded dependencies (logback 1.5.7 and slf4j 2.0.16) able to generate loggers. Thank you very much for your time in troubleshooting. :) |
Why this Issue is still open? |
After upgraded our application from java 8 to Java 17 log file is not getting generated with logback version 1.3.14
When searched in google found that 1.3.14 supports till Java 8, so added latest logback version 1.5.7 in pom.xml but still log file is not getting generated.
Could someone please review below logback.xml config file and let me know whether am I missing something?
`
`
The text was updated successfully, but these errors were encountered: