Add long (but unused) log format

This commit is contained in:
nicolargo 2018-03-15 21:00:57 +01:00
parent 37eaeed55e
commit 23f44c34e8
2 changed files with 7 additions and 3 deletions

View File

@ -306,7 +306,7 @@ You can install Glances using ``Puppet``: https://github.com/rverchere/puppet-gl
Ansible
-------
A Glances ``Ansible`` role is available: https://github.com/zaxos/glances-ansible-role
A Glances ``Ansible`` role is available: https://galaxy.ansible.com/zaxos/glances-ansible-role/
Usage
=====

View File

@ -27,7 +27,8 @@ import tempfile
import logging
import logging.config
LOG_FILENAME = os.path.join(tempfile.gettempdir(), 'glances-{}.log'.format(getpass.getuser()))
LOG_FILENAME = os.path.join(tempfile.gettempdir(),
'glances-{}.log'.format(getpass.getuser()))
# Define the logging configuration
LOGGING_CFG = {
@ -42,7 +43,10 @@ LOGGING_CFG = {
"format": "%(asctime)s -- %(levelname)s -- %(message)s"
},
"short": {
"format": "%(levelname)s: %(message)s"
"format": "%(levelname)s -- %(message)s"
},
"long": {
"format": "%(asctime)s -- %(levelname)s -- %(message)s (%(funcName)s in %(filename)s)"
},
"free": {
"format": "%(message)s"