mirror of
https://github.com/nicolargo/glances.git
synced 2026-03-15 12:27:24 -04:00
Add Glances log file managment to temp folder
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
|
||||
import logging
|
||||
import logging.config
|
||||
import tempfile
|
||||
import os
|
||||
|
||||
# Define the logging configuration
|
||||
LOGGING_CFG = {
|
||||
@@ -43,7 +45,8 @@ LOGGING_CFG = {
|
||||
'level':'DEBUG',
|
||||
'class':'logging.handlers.RotatingFileHandler',
|
||||
'formatter': 'standard',
|
||||
'filename': '/tmp/glances.log'
|
||||
# http://stackoverflow.com/questions/847850/cross-platform-way-of-getting-temp-directory-in-python
|
||||
'filename': os.path.join(tempfile.gettempdir(), 'glances.log')
|
||||
},
|
||||
'console':{
|
||||
'level':'ERROR',
|
||||
|
||||
Reference in New Issue
Block a user