Teil 27: logging.config
This commit is contained in:
33
teil27/handler_config.json
Normal file
33
teil27/handler_config.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"version":1,
|
||||
"formatters":{
|
||||
"std_out":{
|
||||
"format": "%(asctime)s : %(levelname)s : %(module)s : %(funcName)s : %(lineno)d : (Process Details : (%(process)d, %(processName)s), Thread Details : (%(thread)d, %(threadName)s))\nLog : %(message)s",
|
||||
"datefmt":"%d-%m-%Y %I:%M:%S"
|
||||
}
|
||||
},
|
||||
"handlers":{
|
||||
"console":{
|
||||
"formatter": "std_out",
|
||||
"class": "logging.StreamHandler",
|
||||
"level": "DEBUG"
|
||||
},
|
||||
"db":{
|
||||
"formatter": "std_out",
|
||||
"()": "__main__.DBHandler",
|
||||
"level": "DEBUG"
|
||||
},
|
||||
"file":{
|
||||
"formatter":"std_out",
|
||||
"class":"logging.FileHandler",
|
||||
"level":"DEBUG",
|
||||
"filename" : "raspithek.log"
|
||||
}
|
||||
},
|
||||
"root":{
|
||||
"handlers":["console","file","db"],
|
||||
"level": "DEBUG"
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user