cache image, download log etc.
This commit is contained in:
@@ -31,7 +31,7 @@ import helpers
|
||||
|
||||
# These settings are for file logging only
|
||||
FILENAME = "plexpy.log"
|
||||
MAX_SIZE = 1000000 # 1 MB
|
||||
MAX_SIZE = 5000000 # 5 MB
|
||||
MAX_FILES = 5
|
||||
|
||||
_BLACKLIST_WORDS = []
|
||||
@@ -42,18 +42,6 @@ logger = logging.getLogger("plexpy")
|
||||
# Global queue for multiprocessing logging
|
||||
queue = None
|
||||
|
||||
class LogListHandler(logging.Handler):
|
||||
"""
|
||||
Log handler for Web UI.
|
||||
"""
|
||||
|
||||
def emit(self, record):
|
||||
message = self.format(record)
|
||||
message = message.replace("\n", "<br />")
|
||||
|
||||
plexpy.LOG_LIST.insert(0, (helpers.now(), message, record.levelname, record.threadName))
|
||||
|
||||
|
||||
class NoThreadFilter(logging.Filter):
|
||||
"""
|
||||
Log filter for the current thread
|
||||
@@ -209,12 +197,6 @@ def initLogger(console=False, log_dir=False, verbose=False):
|
||||
logger.propagate = False
|
||||
logger.setLevel(logging.DEBUG if verbose else logging.INFO)
|
||||
|
||||
# Add list logger
|
||||
loglist_handler = LogListHandler()
|
||||
loglist_handler.setLevel(logging.DEBUG)
|
||||
|
||||
logger.addHandler(loglist_handler)
|
||||
|
||||
# Setup file logger
|
||||
if log_dir:
|
||||
filename = os.path.join(log_dir, FILENAME)
|
||||
|
Reference in New Issue
Block a user