Lars Kellogg-Stedman
869ecba652
journald log driver: use CONTAINER_ID field for container id
...
This patch modifies the journald log driver to store the container ID in
a field named CONTAINER_ID, rather than (ab)using the MESSAGE_ID field.
Additionally, this adds the CONTAINER_ID_FULL field containing the
complete container ID and CONTAINER_NAME, containing the container name.
When using the journald log driver, this permits you to see log messages
from a particular container like this:
# journalctl CONTAINER_ID=a9238443e193
Example output from "journalctl -o verbose" includes the following:
CONTAINER_ID=27aae7361e67
CONTAINER_ID_FULL=27aae7361e67e2b4d3864280acd2b80e78daf8ec73786d8b68f3afeeaabbd4c4
CONTAINER_NAME=web
Closes : #12864
Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
2015-04-30 10:42:27 -04:00
Dan Walsh
364287b741
Add journald as a supported logger for containers
...
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-04-21 12:57:54 -04:00
Darren Shepherd
05641ccffc
Change syslog format and facility
...
This patch changes two things
1. Set facility to LOG_DAEMON
2. Remove ": " from tag so that the tag + pid become a single column in
the log
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-04-15 12:46:43 -07:00
Deng Guangxing
4f91a333d5
move syslog-tag to syslog.New function
...
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-04-13 11:24:18 -07:00
unclejack
132da3f036
daemon/logger/jsonfilelog: avoid some allocations
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-02 18:33:23 +03:00
Alena Prokharchyk
dabd8a02ae
Removed unused "mutex" field
...
fixes #11659
Signed-off-by: Alena Prokharchyk <alena@rancher.com>
2015-03-23 19:05:21 -07:00
Anton Tiurin
f2c7b4d743
Syslog.Log - Remove redundant cast of msg.Line []byte to string as
...
it's a fmt.Sprintf responsibility.
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-03-24 01:35:54 +03:00
Alexander Morozov
2717302cc6
Merge pull request #11654 from runcom/11650-syslog-close-redunant-nil-check
...
syslog Close() - Remove redunant nil check, s.writer cannot be nil
2015-03-23 12:32:26 -07:00
Antonio Murdaca
e600df2d97
Remove redunant nil check, s.writer cannot be nil
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-23 20:03:24 +01:00
Antonio Murdaca
8f025aae36
Refactor syslog Log else clause
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-23 20:01:01 +01:00
Alexander Morozov
65e21f5703
Merge pull request #11458 from ibuildthecloud/syslog
...
Add syslog logging driver
2015-03-23 11:34:33 -07:00
sidharthamani
eaecd8b1b5
add syslog driver
...
Signed-off-by: wlan0 <sid@rancher.com>
2015-03-21 18:01:18 -07:00
Jessie Frazelle
474f58e2e7
Merge pull request #11471 from LK4D4/wait_for_copier
...
Wait for copier finishing it's work before closing logger
2015-03-18 15:41:12 -07:00
Alexander Morozov
b6a42673ab
Wait for copier finishing it's work before closing logger
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-18 13:48:01 -07:00
Alexander Morozov
bd8661e8fa
Protect jsonfilelog writes with mutex
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-18 13:00:53 -07:00
Alexander Morozov
47a6afb93f
Default 'json-file' logging driver and none logging driver
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-13 12:13:21 -07:00
Alexander Morozov
14887e2e1f
Interface Logger for logging drivers
...
Also there is aux datastructure Copier which can copy lines from streams
to Loggers
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-13 11:46:59 -07:00