Skip to content
This repository was archived by the owner on Dec 9, 2020. It is now read-only.

Logging#10

Open
philipppahl wants to merge 4 commits intobabbel:masterfrom
philipppahl:logging
Open

Logging#10
philipppahl wants to merge 4 commits intobabbel:masterfrom
philipppahl:logging

Conversation

@philipppahl
Copy link
Copy Markdown
Contributor

@philipppahl philipppahl commented Apr 6, 2016

floto logging

This PR proposes the introduction of log handlers for floto.
As floto is a library the handlers are not created inside floto. Instead it's done via logging configuration.

Changes proposed in this pull request:

  • template yaml files for the logger set up: See examples/hello_world.py / logging/*.yml
  • Introduction of floto.utils.logging_filter classes which add context information and the identity to the log record: Used in floto.ActivityWorker

Todos

  • Add context information to decider loggers
  • Add environment information (staging/production) to Logger
  • Move all logger to class level instead of module level
  • Add use case driven loggers, e.g. CloudWatch / Monitor logger

/cc @amatthies

@philipppahl
Copy link
Copy Markdown
Contributor Author

@amatthies
This is considered WIP, please have a look and comment on the "pattern". When the pattern is right, I'll add the missing parts.

Comment thread floto/logger.py
def add_identity(self, msg):
new_msg = ''
if self.identity:
new_msg = '{}:{}'.format(self.identity, msg)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants