1. jagguli
  2. aioweb

Commits

jagguli  committed d52dedf

logging config files

  • Participants
  • Parent commits 23e2db3
  • Branches devel

Comments (0)

Files changed (2)

File src/aioweb/conf/logging.json

View file
     "formatters": {
         "standard": {
             "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
+        }, 
+        "verbose": {
+            "()": "aioweb.config.VerboseFormatter",
+            "format": "VERBOSE%(asctime)s [%(levelname)s] %(name)s: %(message)s"
         }
     }, 
-    "incremental": true, 
-    "loggers": {
-        "":{
-            "propagate": false, 
-            "handlers": [
-                "console"
-            ], 
-            "level": "DEBUG"
+    "handlers": {
+        "console":{
+            "class" : "logging.StreamHandler",
+            "formatter": "verbose",
+            "level"   : "INFO",
+            "stream"  : "ext://sys.stdout"
         },
+        "file": {
+            "class" : "logging.handlers.RotatingFileHandler",
+            "formatter": "verbose",
+            "filename": "logconfig.log",
+            "maxBytes": 1024,
+            "backupCount": 3
+        }
+    },
+    "root":{
+        "propagate": false, 
+        "handlers": [
+            "console"
+        ], 
+        "level": "DEBUG"
+    },
+    "loggers": {
         "asyncio": {
             "propagate": false, 
             "handlers": [

File src/aioweb/conf/logging_test.json

View file
 {
+    "formatters": {
+        "standard": {
+            "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
+        }
+    },
     "disable_existing_loggers": false,
+    "incremental": true,
     "version": 1,
     "loggers": {
         "CouchDBAdapter": {
-            "propagate": false,
             "handlers": [
                 "console"
             ],
-            "level": "WARN"
+            "level": "WARN",
+            "propagate": false
         },
         "config": {
-            "propagate": false,
             "handlers": [
                 "console"
             ],
-            "level": "WARN"
-        }
-    },
-    "incremental": true,
-    "formatters": {
-        "standard": {
-            "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
+            "level": "WARN",
+            "propagate": false
         }
     }
 }