Is it possible for lager to output 2 different log file for different application?

612 Views Asked by At

I want to write a monitoring application (erlang application). The monitored application and my monitoring application are not both written in erlang and run in the same vm.

Now the log is mixed, and I consider to use disk_log in monitoring application.

My question is that is it possible for both applications use lager and lager output log into different file?

1

There are 1 best solutions below

1
On BEST ANSWER

It's possible to log specific messages to separate files using lager, but the common log files like info.log would have those messages as well. If that's fine with you take a look at tracing: https://github.com/basho/lager/blob/master/README.md#tracing