Restructuring

Logging
Basic config loading from plugins/providers
This commit is contained in:
Ruud
2011-02-12 20:34:15 +01:00
parent 8be7cba417
commit 722731c8bc
14 changed files with 229 additions and 22 deletions
+9
View File
@@ -0,0 +1,9 @@
config = ('global', {
'environment': 'production',
'host': '0.0.0.0',
'port': 5000,
'username': '',
'password': '',
'launch_browser': True,
'url_base': '',
})
+21
View File
@@ -0,0 +1,21 @@
from couchpotato import app
class CPLog():
context = ''
def __init__(self, context = ''):
self.context = context
self.logger = app.logger
def info(self, msg):
self.logger.info(self.addContext(msg))
def debug(self, msg):
self.logger.debug(self.addContext(msg))
def error(self, msg):
self.logger.error(self.addContext(msg))
def addContext(self, msg):
return '[%+25.25s] %s' % (self.context[-25:], msg)
+1
View File
@@ -0,0 +1 @@
@@ -0,0 +1,4 @@
config = ('Renamer', {
'enabled': False,
'cleanup': False
})
@@ -0,0 +1,3 @@
config = ('TheMovieDB', {
'key': '9b939aee0aaafc12a65bf448e4af9543'
})