chatbot icon indicating copy to clipboard operation
chatbot copied to clipboard

Add logging handler

Open jwilm opened this issue 10 years ago • 1 comments

The logging handler should record messages from all adapters to arbitrary back ends. Maybe it would look something like this:

let mut bot = Chatbot::new("log cutter");
bot.add_adapter(Logger::new(LoggingBackend::File("some/sort/of/path/maybe/with/file.txt"));
bot.add_adapter(Logger::new(LoggingBackend::WebHook("http://example.com/log/receiver"));
bot.add_adapter(Logger::new(LoggingBackend::PostgreSql(PostgreSqlConfig)));

Probably fine to just start with a File backend and maybe add the others in the future.

jwilm avatar Jun 03 '15 15:06 jwilm

To make a complete logging solution, we will need a few more message types Msg::Self, Msg::Join, Msg::Part, and Msg::Quit.

jwilm avatar Jun 08 '15 15:06 jwilm