mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
chore: remove unused class
This commit is contained in:
parent
7dc5fdb7b3
commit
0ba5a09975
@ -435,20 +435,12 @@ def setup_logging(bench_path='.'):
|
|||||||
self._log(LOG_LEVEL, message, args, **kws)
|
self._log(LOG_LEVEL, message, args, **kws)
|
||||||
logging.Logger.log = logv
|
logging.Logger.log = logv
|
||||||
|
|
||||||
class log_filter(object):
|
|
||||||
def __init__(self, level):
|
|
||||||
self.__level = level
|
|
||||||
|
|
||||||
def filter(self, logRecord):
|
|
||||||
return logRecord.levelno == self.__level
|
|
||||||
|
|
||||||
if os.path.exists(os.path.join(bench_path, 'logs')):
|
if os.path.exists(os.path.join(bench_path, 'logs')):
|
||||||
logger = logging.getLogger(bench.PROJECT_NAME)
|
logger = logging.getLogger(bench.PROJECT_NAME)
|
||||||
log_file = os.path.join(bench_path, 'logs', 'bench.log')
|
log_file = os.path.join(bench_path, 'logs', 'bench.log')
|
||||||
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
|
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
|
||||||
hdlr = logging.FileHandler(log_file)
|
hdlr = logging.FileHandler(log_file)
|
||||||
hdlr.setFormatter(formatter)
|
hdlr.setFormatter(formatter)
|
||||||
|
|
||||||
logger.addHandler(hdlr)
|
logger.addHandler(hdlr)
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user