Add Log class that can be inherited from safely
[cascardo/ipsilon.git] / ipsilon / util / log.py
1 #!/usr/bin/python
2 #
3 # Copyright (C) 2014 Ipsilon Project Contributors
4 #
5 # See the file named COPYING for the project license
6
7 import cherrypy
8
9
10 class Log(object):
11
12     def debug(self, fact):
13         if cherrypy.config.get('debug', False):
14             cherrypy.log(fact)
15
16     # for compatibility with existing code
17     _debug = debug
18
19     def log(self, fact):
20         cherrypy.log(fact)