Logs a message with a specific level.
There are various shorthand functions for this, such as info and warn.