2019-03-10 16:38:59 +01:00
|
|
|
from __future__ import print_function
|
2017-07-30 18:51:19 +02:00
|
|
|
import jwutils.log
|
|
|
|
|
|
|
|
|
|
class Object(object): # export
|
|
|
|
|
|
|
|
|
|
def __init__():
|
2017-08-07 18:05:53 +02:00
|
|
|
self.log_level = jwutils.log.level
|
2017-07-30 18:51:19 +02:00
|
|
|
|
|
|
|
|
def log(self, prio, *args):
|
2017-08-07 18:05:53 +02:00
|
|
|
if self.log_level == jwutils.log.level:
|
|
|
|
|
jwutils.log.slog(prio, args)
|
|
|
|
|
return
|
2017-07-30 18:51:19 +02:00
|
|
|
if prio <= self.log_level:
|
|
|
|
|
msg = ""
|
|
|
|
|
for count, thing in enumerate(args):
|
2017-08-07 18:05:53 +02:00
|
|
|
msg += ' ' + str(*thing)
|
2017-07-30 18:51:19 +02:00
|
|
|
if len(msg):
|
2019-03-10 16:38:59 +01:00
|
|
|
print(msg[1:])
|
2017-07-30 18:51:19 +02:00
|
|
|
|
|
|
|
|
def debug(self, *args):
|
2017-08-07 18:05:53 +02:00
|
|
|
jwutils.log.slog(jwutils.log.DEBUG, args)
|