--- /dev/null
+{
+ "version": 1,
+ "disable_existing_loggers": false,
+ "handlers": {
+ "console": {
+ "class": "logging.StreamHandler",
+ "level": "DEBUG",
+ "formatter": "console_format"
+ },
+ "file_log": {
+ "class": "logging.handlers.RotatingFileHandler",
+ "level": "DEBUG",
+ "formatter": "logfile_format",
+ "filename": "/var/log/mk_home.log",
+ "encoding": "utf-8",
+ "maxBytes": 10485760,
+ "backupCount": 9
+ }
+ },
+ "formatters": {
+ "console_format": {
+ "format": "[%(levelname)s] %(name)s %(message)s"
+ },
+ "logfile_format": {
+ "format": "[%(asctime)s] [%(levelname)s] %(name)s %(message)s"
+ }
+ },
+ "root": {
+ "level": "INFO",
+ "handlers": [
+ "console",
+ "file_log"
+ ]
+ },
+ "loggers": {
+ "paramiko.transport": {
+ "level": "INFO"
+ }
+ }
+}
from .app import PpApplication
-__version__ = '0.4.3'
+__version__ = '0.4.4'
LOG = logging.getLogger(__name__)
msg = "Wrong file {!r} - ".format(cfg_file) + str(e)
self.handle_error(msg, e.__class__.__name__)
continue
+ if self.verbose > 1:
+ LOG.debug("Evaluated configuration from JSON:\n{} ...".format(pp(log_cfg)))
try:
logging.config.dictConfig(log_cfg)
except Exception as e:
root_logger = logging.getLogger()
- for log_handler in root_logger.handlers:
- root_logger.removeHandler(log_handler)
+# for log_handler in root_logger.handlers:
+# root_logger.removeHandler(log_handler)
if self._init_logging_from_jsonfile():
return
- self.init_logging()
+# self.init_logging()
return