Docker:Logging
Docker Logging 방법.
Drivers
Local File logging driver
Options:
Option</code> | | <code>Example value |
| The maximum size of the log before it is rolled. A positive integer plus a modifier representing the unit of measure ( | |
| The maximum number of log files that can be present. If rolling the logs creates excess files, the oldest file is removed. A positive integer. Defaults to 5. | |
| Toggle compression of rotated log files. Enabled by default. | |
Graylog Extended Format logging driver
- Graylog Extended Format logging driver | Docker Documentation
- Gist - Send docker logs to ELK through gelf log driver
- Gist - Example of logging with docker gelf logger to logstash
- Send Your Docker Container Logs to ELK (Elasticsearch, Logstash and Kibana) with Gelf Driver (Docker:Logging, GEFL, Elasticsearch, Logstash, Kibana)
docker run --log-driver gelf --log-opt gelf-address=udp://localhost:12201 --rm -it ubuntu bash -c 'while true; do echo kkkkk; sleep 1; done'
자세한 내용은 Logstash#Docker GELF logging 항목 참조.
참고로 gelf는 Graylog Extended Log Format의 약자이다.