Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the log level argument to the parser (-l, --log) which by default ... #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rickysaltzer
Copy link

...is INFO. The reason for this is to disable DEBUG level logging by default, since a performance degradation was found when collating large volumes of incoming messages.

Additionally, both the address and port arguments were given the (-a, --addr // -p, --port) argument options and were both set to required.

A basic call to dispatch would look like

$ python dasinbox.py --addr 0.0.0.0 --port 4467 --log info
or
$ python dasinbox.py -a 0.0.0.0 -p 4467 -l info

Of course, INFO can be replaced with the following choices (critical, error, warning, notice, info, debug)

…lt is INFO. The reason for this is to disable DEBUG level logging by default, since a performance degradation was found when collating large volumes of incoming messages.


Additionally, both the address and port arguments were given the (-a, --addr // -p, --port) argument options and were both set to required. 

A basic call to dispatch would look like

$ python dasinbox.py --addr 0.0.0.0 --port 4467 --log info
or
$ python dasinbox.py -a 0.0.0.0 -p 4467 -l info

Of course, INFO can be replaced with the following choices (critical, error, warning, notice, info, debug)
@n3storm
Copy link

n3storm commented Nov 27, 2014

Bump. I think this is interesting as my log files are full of email bodies and growing pretty big.

@waynew
Copy link

waynew commented Aug 2, 2016

This has been hanging around for quite some time @kennethreitz - any plans on merging it in? :)

parser.add_argument('port', metavar='port', type=int, help='port to bind to')
parser.add_argument('-a', '--addr', metavar='addr', type=str, help='addr to bind to', required=True)
parser.add_argument('-p', '--port', metavar='port', type=int, help='port to bind to', required=True)
parser.add_argument('-l', '--log', metavar='log', type=str, help='logging level (%s)' % (','.join(log_choices)), default='info', choices=log_choices)
Copy link

Choose a reason for hiding this comment

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

You are using tabs instead of spaces here, please fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants