回答編集履歴

2

add

2015/08/31 05:32

投稿

ngyuki
ngyuki

スコア4514

test CHANGED
@@ -23,3 +23,37 @@
23
23
 
24
24
 
25
25
  [http://heartbeats.jp/hbblog/2014/07/3-tips-for-nginx-on-docker.html](http://heartbeats.jp/hbblog/2014/07/3-tips-for-nginx-on-docker.html)
26
+
27
+
28
+
29
+ ---
30
+
31
+
32
+
33
+ 他にも、コンテナの中から標準出力や標準エラーにログを書き込めば、ホストの、
34
+
35
+
36
+
37
+ ```
38
+
39
+ /var/lib/docker/containers/<CONTAINER>/<CONTAINER>-json.log
40
+
41
+ ```
42
+
43
+
44
+
45
+ のようなパスに保存されるようです。これを fluentd で処理すると、いい感じに扱えそうな気もします。
46
+
47
+
48
+
49
+ - [http://www.fluentd.org/guides/recipes/docker-logging](http://www.fluentd.org/guides/recipes/docker-logging)
50
+
51
+ - [http://stackoverflow.com/questions/22541333/have-nginx-access-log-and-error-log-log-to-stdout-and-stderr-of-master-process](http://stackoverflow.com/questions/22541333/have-nginx-access-log-and-error-log-log-to-stdout-and-stderr-of-master-process)
52
+
53
+
54
+
55
+ (docker も fluentd もまだ本気で使ったことはないので想像ですけれども)
56
+
57
+
58
+
59
+

1

add

2015/08/31 05:32

投稿

ngyuki
ngyuki

スコア4514

test CHANGED
@@ -11,3 +11,15 @@
11
11
  docker kill -s HUP <CONTAINER>
12
12
 
13
13
  ```
14
+
15
+
16
+
17
+ ---
18
+
19
+
20
+
21
+ 他にも syslog に飛ばすようにする方法もあるようです。
22
+
23
+
24
+
25
+ [http://heartbeats.jp/hbblog/2014/07/3-tips-for-nginx-on-docker.html](http://heartbeats.jp/hbblog/2014/07/3-tips-for-nginx-on-docker.html)