2016-02-29 10:48:00 +02:00
|
|
|
#!/usr/bin/env python3
|
2016-02-08 19:03:04 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
|
|
|
import logging
|
|
|
|
import logging.config
|
2016-03-23 17:15:27 +02:00
|
|
|
|
2016-08-24 18:05:54 +03:00
|
|
|
from base.scope import Scope
|
2016-02-08 19:03:04 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
|
2016-08-24 18:05:54 +03:00
|
|
|
class AAAAAAAhenkLogger(object):
|
2016-03-23 17:15:27 +02:00
|
|
|
"""docstring for Logger"""
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super(Logger, self).__init__()
|
|
|
|
scope = Scope.getInstance()
|
|
|
|
configManager = scope.getConfigurationManager()
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
logging.config.fileConfig(configManager.get('BASE', 'logConfigurationFilePath'))
|
|
|
|
self.logger = logging.getLogger()
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def getLogger(self):
|
|
|
|
return self.logger
|
2016-02-08 19:03:04 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def info(self, logstring):
|
|
|
|
self.logger.info(logstring)
|
2016-02-08 19:03:04 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def warning(self, logstring):
|
|
|
|
self.logger.warning(logstring)
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def error(self, logstring):
|
|
|
|
self.logger.error(logstring)
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def debug(self, logstring):
|
|
|
|
self.logger.debug(logstring)
|