Log Method
Besides the logging that Gopherbot does on it's own, plugins can also emit log messages with one of the following log levels:
Trace
- for fine-grained logging of all actionsDebug
- for emitting debugging infoInfo
- the default log levelAudit
- for auditable events - NOTE: Audit events are always logged regardless of the current log levelWarn
- for potentially harmful eventsError
- for errorsFatal
- emit fatal error and cause robot to exit(1)
Bash
Log "Error" "The robot broke"
Python
bot.Log("Error", "The robot broke")
Ruby
bot.Log(:error, "The robot broke")
# or
bot.Log("Error", "The robot broke")
Symbols look better and work just fine.
Pause Method
Every language has some means of sleeping / pausing, and this method is provided as a convenience to plugin authors and implemented natively. It takes a single argument, time in seconds.
Bash
Say "Be back soon!"
Pause 2
Say "... aaaand I'm back!"
Python
bot.Say("Be back soon!")
bot.Pause(2)
bot.Say("... aaaand I'm back!")
Ruby
bot.Say("Be back soon!")
bot.Pause(2)
bot.Say("... aaaand I'm back!")