马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
正常情况下,我们的配置都是默认的,导致rabbit@controller1.log 看上去不怎么直观 2 h& e0 ?) u" q& w9 d: l6 r
修改RabbitMQ的配置文件。
9 D+ j7 R7 b; P S 修改RabbitMQ的配置文件。
5 ^% m6 B8 D" m' V% g% I# f/ C3 V7 \& Y# H0 F
. E; h$ [1 r' C3 Q
: d9 f1 r9 Y( i' O( g$ H{$ c" f! a8 J. z1 F6 {& e- p* E
lager, [
, ^8 @7 j! z2 u) ^' Q$ L% C %% All log messages go to the default "sink" configured with
1 v$ w$ T5 i! \4 U; i. h, i %% the `handlers` parameter. By default, it has a single, a9 m9 @7 w9 U0 ~- Y: p# F
%% lager_file_backend handler writing messages to "$nodename.log"
8 e6 s8 V4 u: M: ` %% (ie. the value of $RABBIT_LOGS).
$ g& V: ]! B' n* p- k$ G2 o {handlers, [& Q* y# O/ R0 c9 c
{lager_file_backend, [{file, "rabbit.log"},
5 s) h# M( Z, G S' Y$ o4 c9 K {level, info},; b# u" a/ |+ J W
{date, ""},9 h' r6 G% Y/ q: a) ]
{size, 0}]}3 M0 `& [% L: B M) {7 q( O
]},
; }& p0 V2 r0 e9 w% N/ h{extra_sinks, [ W8 p M5 J/ S3 g! |7 n
+ {! s) q5 P# b$ Y4 o
0 {2 C* B" `- ^0 D. q; `6 i3 f {rabbit_channel_lager_event, [{handlers, [. {& I% i) _/ Z/ u- L2 z, a
{lager_forwarder_backend,
/ _* c* _1 B( _ |/ e2 E5 t [lager_event, info]}]}]},* C: ^' o: f, o) r- D1 ]" h1 F
{rabbit_conection_lager_event, [{handlers, [
9 P( e1 z" U* r1 U: \7 T {lager_forwarder_backend,
* P( \: k# ^, O, D% ~" K' ?, ^# b [lager_event, error]}]}]}! Z# t. e- o: g3 h
% s/ D) K# p* N/ O
1 c2 s* N d3 m3 H* N9 y ]}: ?4 |* D8 z; u1 M! f
, P; r9 f" u& a* |# t8 M
( b+ Z; d" c j6 n) E
' |, w) [6 ]8 i# n! l5 o修改后,RabbitMQ的日志文件名变为rabbit.log。
- i) L8 M. U q, f7 a5 E+ r
u0 S0 I8 [! ?7 { |