forked from platypush/platypush
Added logger plugin
This commit is contained in:
parent
6508ef29a1
commit
72543c26a9
1 changed files with 46 additions and 0 deletions
46
platypush/plugins/logger.py
Normal file
46
platypush/plugins/logger.py
Normal file
|
@ -0,0 +1,46 @@
|
|||
from platypush.plugins import Plugin, action
|
||||
|
||||
|
||||
class LoggerPlugin(Plugin):
|
||||
"""
|
||||
Plugin to log traces on the standard Platypush logger
|
||||
"""
|
||||
|
||||
@action
|
||||
def trace(self, msg, *args, **kwargs):
|
||||
"""
|
||||
logger.trace wrapper
|
||||
"""
|
||||
self.logger.trace(msg, *args, **kwargs)
|
||||
|
||||
@action
|
||||
def debug(self, msg, *args, **kwargs):
|
||||
"""
|
||||
logger.debug wrapper
|
||||
"""
|
||||
self.logger.debug(msg, *args, **kwargs)
|
||||
|
||||
@action
|
||||
def info(self, msg, *args, **kwargs):
|
||||
"""
|
||||
logger.info wrapper
|
||||
"""
|
||||
self.logger.info(msg, *args, **kwargs)
|
||||
|
||||
@action
|
||||
def warning(self, msg, *args, **kwargs):
|
||||
"""
|
||||
logger.warning wrapper
|
||||
"""
|
||||
self.logger.warning(msg, *args, **kwargs)
|
||||
|
||||
@action
|
||||
def error(self, msg, *args, **kwargs):
|
||||
"""
|
||||
logger.error wrapper
|
||||
"""
|
||||
self.logger.error(msg, *args, **kwargs)
|
||||
|
||||
|
||||
# vim:sw=4:ts=4:et:
|
||||
|
Loading…
Reference in a new issue