Closed w495 closed 11 years ago
Alog is dead, isn't? Use lager instead.
hm.. I think ates is right. Now we don't commit to alogger
А гуглогруппах говорили, что не умрет. ((( It is very sad! Lager cannot add handlers at runtime.
Hi,
I'm thinking about resumption of development, and this particular feature is in my TODO (moreover, I heard that this is already implemented in one of the forks, probably a private one, so I'll ask for a pull request).
Now it's possible, here's an example of configuration:
{alog,
[{enabled_loggers,
[{access_log, alog_disk_log},
{messages_log, alog_disk_log},
]},
{flows,
[{{mod, ['_']}, {'=<', debug}, [{{messages_log, alog_disk_log}, alog_disk_log}]},
{{tag, ['access']}, {'=<', debug}, [{{access_log, alog_disk_log}, alog_disk_log}]},
]},
{access_log,
[{name, access_log},
{file, "/var/log/your_node/access.log"},
{format, external}
]},
{messages_log,
[{name, messages_log},
{file, "/var/log/your_node/messages.log"},
{format, external}
]},
]}
I'll update the documentation soon, so it reflects the code changes.
I need to write different log levels messages in different log files. What should I do? It'ill be nice to use something like this:
Is there way to do this with current version of alogger?