mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Split the tipbot in modules: - main modules to contain base functions by theme - coin specs, to define a coin's specifics - optional modules, defining commands/behaviors
36 lines
716 B
Python
36 lines
716 B
Python
#!/bin/python
|
|
#
|
|
# Cryptonote tipbot - logging
|
|
# Copyright 2014 moneromooo
|
|
#
|
|
# The Cryptonote tipbot is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License as published
|
|
# by the Free Software Foundation; either version 2, or (at your option)
|
|
# any later version.
|
|
#
|
|
|
|
import time
|
|
|
|
def log(stype,msg):
|
|
header = "%s\t%s\t" % (time.ctime(time.time()),stype)
|
|
print "%s%s" % (header, str(msg).replace("\n","\n"+header))
|
|
|
|
def log_error(msg):
|
|
log("ERROR",msg)
|
|
|
|
def log_warn(msg):
|
|
log("WARNING",msg)
|
|
|
|
def log_info(msg):
|
|
log("INFO",msg)
|
|
|
|
def log_log(msg):
|
|
log("LOG",msg)
|
|
|
|
def log_IRCRECV(msg):
|
|
log("IRCRECV",msg)
|
|
|
|
def log_IRCSEND(msg):
|
|
log("IRCSEND",msg)
|
|
|