From 269aa4c7df03e1e581c01866c91bcfa5524d6334 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 27 Aug 2024 14:43:59 +0200 Subject: Rewrite using C/CMake/Gtk4 and add some features/tweaks --- ayatanasettings/logger.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 ayatanasettings/logger.py (limited to 'ayatanasettings/logger.py') diff --git a/ayatanasettings/logger.py b/ayatanasettings/logger.py deleted file mode 100644 index 4b8763e..0000000 --- a/ayatanasettings/logger.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import logging -from .appdata import APPNAME - -class Formatter(logging.Formatter): - - def __init__(self): - - logging.Formatter.__init__(self, '[%(asctime)s] %(levelname)s: %(message)s') - self.default_msec_format = '%s.%03d' - - def format(self, record): - - dColours = {'WARNING': '33', 'INFO': '32', 'DEBUG': '37', 'CRITICAL': '35', 'ERROR': '31'} - record.levelname = '\033[1;' + dColours[record.levelname] + 'm' + record.levelname + '\033[0m' - - return logging.Formatter.format(self, record) - -logger = logging.getLogger(APPNAME) -logger.setLevel(logging.DEBUG) -pStreamHandler = logging.StreamHandler() -pStreamHandler.setFormatter(Formatter()) -logger.addHandler(pStreamHandler) -- cgit v1.2.3