
__author__ = 'Miroslav Bauer'


import logging
from constants import LOG_LEVEL

class Logger(object):
	''' Proxy class over logging.logger used
	    for application logging with configured log level.
	    It's possible to customize log messages here.
	'''

	def __init__(self, name):
		self._logger = logging.getLogger(name)
		self._logger.setLevel(LOG_LEVEL)

	def addHandler(self, fhandle):
		self._logger.addHandler(fhandle)

	def debug(self, message):
		self._logger.debug(message)

	def info(self, message):
		self._logger.info(message)

	def warn(self, message):
		self._logger.warning(message)

	def err(self, message):
		self._logger.error(message)
