Restructuring
Logging Basic config loading from plugins/providers
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
config = ('global', {
|
||||
'environment': 'production',
|
||||
'host': '0.0.0.0',
|
||||
'port': 5000,
|
||||
'username': '',
|
||||
'password': '',
|
||||
'launch_browser': True,
|
||||
'url_base': '',
|
||||
})
|
||||
@@ -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)
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
config = ('Renamer', {
|
||||
'enabled': False,
|
||||
'cleanup': False
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
config = ('TheMovieDB', {
|
||||
'key': '9b939aee0aaafc12a65bf448e4af9543'
|
||||
})
|
||||
Reference in New Issue
Block a user