Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vadyalex/logcat
Tomcat 8 with configured SLF4J + Logback + logstash-logback-encoder
https://github.com/vadyalex/logcat
Last synced: 29 days ago
JSON representation
Tomcat 8 with configured SLF4J + Logback + logstash-logback-encoder
- Host: GitHub
- URL: https://github.com/vadyalex/logcat
- Owner: vadyalex
- Created: 2015-07-29T13:40:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-29T18:43:33.000Z (over 9 years ago)
- Last Synced: 2024-04-16T07:02:23.839Z (9 months ago)
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# logcat
### Description
Apache Tomcat 8 with JRE 8 based on official image that uses SLF4J + Logback + logstash-logback-encoder for logging.
### Usage
Run the default Tomcat server:
docker run -it --rm -p 8080:8080 vadyalex/logcat
Mount Tomcat logs directory:
docker run -it --rm -p 8080:8080 -v /somewhere/logs:/usr/local/tomcat/logs vadyalex/logcat
Local directory`/somewhere/logs` will contain `tomcat.log` and `tomcat.logstash`.
`tomcat.log` contains logs in human readable form. `tomcat.logstash` contains structured logs in Logstash JSON format that may be directly read by Logstash process:```
input {file {
type => "tomcat"
path => "/somewhere/logs/tomcat.logstash"
codec => "json"
}}
output {
stdout {
codec => rubydebug
}}
````tomcat.log` and `tomcat.logstash` rotated and archived into GZIP file daily. Archives are stored for period of three days.
You can modify default Logback configuration providing custom `logback.xml` that is located at `/somewhere/logback` directory, run logcat image as follows:
docker run -it --rm -p 8080:8080 -v /somewhere/logback:/usr/local/tomcat/conf/logback -v /somewhere/logs:/usr/local/tomcat/logs vadyalex/logcat