Comments (8)
This wrapper library is default configured to behave just like tomcat. You can adjust as needed via the logback xml files.
from tomcat-slf4j-logback.
Any inputs on how to do the needed? As redirect console output to *.log files.
from tomcat-slf4j-logback.
In the logback.xml file, look at this entry...
<appender name="CONSOLE" class="org.apache.juli.logging.ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level {%thread} [%logger{20}] : %msg%n</pattern>
</encoder>
</appender>
Change that to match the others indicating where you want the 'catalina.out' to instead go to 'catalina.log'. That will capture all console output to the locaton you are after.
from tomcat-slf4j-logback.
Better answer...tomcat by default is using catalina.out. You can force writing away by deleting the CONSOLE appender I noted above and by setting the root logger differently in the logback.xml.
<root level="INFO">
<appender-ref ref="FILE-CATALINA" />
</root>
Not certain why you might want to do this as its a tad different than the way tomcat works. You will still end up with a logger for catalina.out but it will be empty doing this. I'm going to close this issue. If you feel others might be interested in this configuration please write up a markdown doc and submit a pull request under a docs/ directory with motivation as to why one might want this style of configuration.
from tomcat-slf4j-logback.
Oh and I would add, the original idea I tossed out likely would have rolled without issue.
from tomcat-slf4j-logback.
Reopening issue as I didn't clearly understand the original concern. After a couple of years with logs in backup location, I clearly see that catalina.out is still populated heavily and never roles. Deeper looking into tomcat seems to indicate that the system out is set to catalina.out rather hard and we are probably not addressing it in any good way. I'm reviewing this now and wanted to note this is likely an issue...
from tomcat-slf4j-logback.
from tomcat-slf4j-logback.
Closing again as this is not an issue with this framework. For other libraries including tomcat, it will use system out and there is nothing this library can do to catch it. Instead, to do so you would need to write a tomcat lifecycle listener that attempts to write it out. That however will only get you so far as other third parties can force logging back to system out unfortunately.
from tomcat-slf4j-logback.
Related Issues (20)
- Configuration reloading HOT 3
- missing maven central dependencies HOT 6
- Git Revision is blank in MANIFEST.MF HOT 1
- Split modules into separate projects HOT 3
- Tomcat 8.5.20 HOT 2
- Using Bitnami's Tomcat stack? HOT 4
- Missed files HOT 3
- Windows characters in 'setenv.sh' HOT 4
- tomcat 8.5.24 cannot be launched HOT 2
- Not possible to add access logging appenders? HOT 2
- ch.qos.logback.core.util.IncompatibleClassException starting tomcat 9.0.2 HOT 4
- Stdout log format HOT 1
- Missing critical line in logback-access config HOT 2
- Releases for new tomcat builds HOT 3
- Cleanup readme
- nevermind HOT 1
- Dependabot couldn't find a pom.xml for this project HOT 1
- How to change the encoder HOT 9
- How to use third party appenders HOT 1
- [QUESTION] How can i customize the catalina.out with logback ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tomcat-slf4j-logback.