diff options
Diffstat (limited to 'gamemode/shared/log.lua')
| -rw-r--r-- | gamemode/shared/log.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gamemode/shared/log.lua b/gamemode/shared/log.lua new file mode 100644 index 0000000..63d3e0e --- /dev/null +++ b/gamemode/shared/log.lua @@ -0,0 +1,23 @@ + +local fn = nrequire("fn.lua") +local col = nrequire("colortheme.lua") +local log = {} + +log.debug = fn.curry( + fn.curry( + MsgC, + col.console.cyan), + fn.curry( + string.format, + "[DEBUG] %s")) + +log.warn = fn.compose( + fn.curry( + MsgC, + col.console.yellow), + debug.traceback, + fn.curry( + ErrorNoHalt, + "[WARNING]")) + +return log |
