Taking action based on Log Level


What is the best way to take action based on log level? For example if I wanted to write the output from all log levels to a text file, but I also wanted to print any @err messages to stdout, what would be the best way to do that? Based on the Julia documentation it seems like the solution has something to do with the ‘handle_message’ function, but I couldn’t find any examples and couldn’t quite figure out how to do it.

Thanks for the help.