Allows users to create an on_log method in their bots that determines
what their log outputs look like.
The current log format is still the default, and this implementation reverts to it if on_log is missing or does not return a string containing log_message. If it returns anything other than that, it'll also provide a helpful warning so users know that their method is getting detected, but just not working like it should.
Example usage (with a timestamp borrowed from #55):
def on_log(bot_name, log_message)
# Add a timestamp to console logs this bot makes
"#{Time.now.strftime('%c')} - #{bot_name}: #{log_message}"
end
The current log format is still the default, and this implementation reverts to it if
on_log
is missing or does not return a string containinglog_message
. If it returns anything other than that, it'll also provide a helpful warning so users know that their method is getting detected, but just not working like it should.Example usage (with a timestamp borrowed from #55):