~thekorn/+junk/central-logging-service

« back to all changes in this revision

Viewing changes to src/log_handler.py

  • Committer: Markus Korn
  • Date: 2011-08-04 12:38:18 UTC
  • Revision ID: markus.korn@edelight.de-20110804123818-icdnghzkx7uwzggh
Added a new (optional) "role" identifier to log entries and fixed indention in log_reciever.py
(actually the role identifier is just an idea, maybe we want sth. like tagging support. There
needs to be a searchable and readable way to organize a huge number of log entries. Filtering
context and level does not seem to be good enough.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        self.connection = httplib2.Http()
18
18
        
19
19
    def emit(self, record):
20
 
        """ POST a log message to the logging server. If the connection
 
20
        """ PUT a log message to the logging server. If the connection
21
21
        failed, or something else goes wrong log message to stderr.
22
22
        """
23
23
        content = record.to_dict(json_safe=True)