Noah Petherbridge
1e80304061
* Add the JavaScript system for Doodads to run their scripts in levels, and wire initial OnCollide() handler support. * CLI: Add a `doodad install-script` command to the doodad tool. * Usage: `doodad install-script <index.js> <filename.doodad>` * Add dev-assets folder for storing source files for the official default doodads, sprites, levels, etc. and for now add a JavaScript for the first test doodad.
37 lines
730 B
Go
37 lines
730 B
Go
package log
|
|
|
|
import "github.com/kirsle/golog"
|
|
|
|
// Logger is the public golog.Logger object.
|
|
var Logger *golog.Logger
|
|
|
|
func init() {
|
|
Logger = golog.GetLogger("doodle")
|
|
Logger.Configure(&golog.Config{
|
|
Level: golog.InfoLevel,
|
|
Theme: golog.DarkTheme,
|
|
Colors: golog.ExtendedColor,
|
|
TimeFormat: "2006-01-02 15:04:05.000000",
|
|
})
|
|
}
|
|
|
|
// Debug logger function.
|
|
func Debug(msg string, v ...interface{}) {
|
|
Logger.Debug(msg, v...)
|
|
}
|
|
|
|
// Info logger function.
|
|
func Info(msg string, v ...interface{}) {
|
|
Logger.Info(msg, v...)
|
|
}
|
|
|
|
// Warn logger function.
|
|
func Warn(msg string, v ...interface{}) {
|
|
Logger.Warn(msg, v...)
|
|
}
|
|
|
|
// Error logger function.
|
|
func Error(msg string, v ...interface{}) {
|
|
Logger.Error(msg, v...)
|
|
}
|