erlang-lager / lager

A logging framework for Erlang/OTP
Apache License 2.0
1.12k stars 456 forks source link

No output when using lager dynamically on detached node [JIRA: RIAK-2301] #299

Closed malotte closed 8 years ago

malotte commented 8 years ago

I'm using lager dynamically, i.e. adding debug tracing during execution, but when I try to do this on a detached erlang-node (that I have attached to) I get no debug output, neither in the shell nor in the files I have specified as backends for info and error in the application environment. I don't want to have debug output generated during normal execution, as when I specify a file backend for the debug level, only occasionally. Am I doing something wrong or isn't it possible?

Shell: (hoc33@venus)2> lager:trace_console([{module, seaz_ws}], debug). {ok,{lager_console_backend,[{module,seaz_ws}],debug}}

sys.config: {lager, [{log_root, "/var/erlang/hoc33/log/lager"}, {handlers, [ {lager_console_backend, [debug, {lager_default_formatter, [date, " ", time," [",severity,"] ",pid, " ", module, ":", line, " ", message, "\n"]}]}, {lager_file_backend, [{file, "error.log"}, {level, error}, {size, 10485760}, {date, "$D0"}, {count, 5}]}, {lager_file_backend, [{file, "console.log"}, {level, info}, {size, 10485760}, {date, "$D0"}, {count, 5}]} ]} ]},

Regards, Malotte

jadeallenx commented 8 years ago

We have a ticket open now to investigate this but I'm not sure offhand why this is happening.

malotte commented 8 years ago

OK. Thanks for looking at it.

Regards, Malotte

On 18 Nov 2015, at 17:06, Mark Allen notifications@github.com wrote:

We have a ticket open now to investigate this but I'm not sure offhand why this is happening.

— Reply to this email directly or view it on GitHub https://github.com/basho/lager/issues/299#issuecomment-157761344.

jadeallenx commented 8 years ago

There was another issue #301 which may be related to how console messages don't travel over disterl. Just wondering if that's what you're hitting here.

jadeallenx commented 8 years ago

I'm going to close this since its been several months since the last update. Please reopen if needed. Thanks.

malotte commented 8 years ago

Sorry, I did not understand that I was supposed to investigate #301. Could you please explain how you think this is related?

Regards

malotte commented 8 years ago

And how do I reopen?

Regards