mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Ticket: CM-1438 Reviewed By: TBD Testing Done: - Will checkin build files after some more testing and performance numbers. It will go into the testing repo for 2.0 - All TODO items are part of the checked in TODO file
29 lines
579 B
Python
29 lines
579 B
Python
#!/usr/bin/python
|
|
|
|
import logging
|
|
|
|
|
|
class log:
|
|
|
|
@staticmethod
|
|
def log_error(obj, prefix, *args, **kwargs):
|
|
obj.get_logger().logger.log_error(''.join(args))
|
|
|
|
@staticmethod
|
|
def log_warn(obj, *args, **kwargs):
|
|
msg = ''
|
|
logger = obj.get_logger()
|
|
errmsg = obj.get_errmsg()
|
|
msg += ''.join(args)
|
|
if errmsg is not None and len(errmsg) > 0:
|
|
msg += '(%s)' %errmsg
|
|
|
|
|
|
@staticmethod
|
|
def log(obj, log_prefix, *args, **kwargs):
|
|
msg = ''
|
|
logger = obj.get_logger()
|
|
msg += ''.join(args)
|
|
|
|
|