Skip to content

Uniform log system #15

Description

@zazasa

It could be useful to define some rule about log files.
There are 2 main question to define:

1- Log destination (i suggest /var/log/hltd/ )
2- Format:

in my python script i used logging library with this configuration:

logging.basicConfig(filename="/tmp/anelastic.log",
 level=logging.INFO,
 format='%(levelname)s:%(asctime)s-%(name)s.%(funcName)s - %(message)s',
 datefmt='%Y-%m-%d %H:%M:%S')

and each class creates is own logger:

def __init__(self):
 self.logger = logging.getLogger(self.__class__.__name__)

it will result something like this in the log file (type-date-class-function-message):

INFO:2014-03-19 17:51:44-LumiSectionHandler.processDATFile - *message*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions