Skip to content
This repository has been archived by the owner. It is now read-only.

More flexible logging. #217

Closed
macosforgebot opened this issue Apr 16, 2008 · 9 comments
Closed

More flexible logging. #217

macosforgebot opened this issue Apr 16, 2008 · 9 comments

Comments

@macosforgebot
Copy link

@macosforgebot macosforgebot commented Apr 16, 2008

@wsanchez originally submitted this as ticket:266

  • Keywords: review

We need a more flexible logging system which is more like what log4j does in Java.

It should allow us to configure logging levels for specific parts of the code, and allow us to reconfigure while the server is running. This will aid significantly in debugging, etc.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 16, 2008

@wsanchez originally submitted this as comment:1:⁠ticket:266

  • Status changed from new to assigned

Cyrus took a stab at this in source:CalendarServer/branches/users/cdaboo/better-logging-2152

I think that's got some problems though: it's kinda complicated, and doesn't play well with Twisted's existing logging system, which is important because we're going to eventually want to improve logging in web2, and that's going to require that Twisted adopt something similar.

I'm taking a stab on this branch: CalendarServer/branches/users/wsanchez/logging/twistedcaldav

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 16, 2008

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 16, 2008

@wsanchez originally submitted this as comment:4:⁠ticket:266


What we need next is a Twisted-style LogObserver that filters out messages based on log level and ID.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 16, 2008

@wsanchez originally submitted this as comment:5:⁠ticket:266


Adding text here to test email to dev list.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 26, 2008

@wsanchez originally submitted this as comment:6:⁠ticket:266

  • Keywords review added

I have what I think is a working setup at source:CalendarServer/branches/users/wsanchez/logging/

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented May 7, 2008

@wsanchez originally submitted this as comment:7:⁠ticket:266


Got some feedback from Cyrus:

  • The Verbose item in config plist seems redundant and is not used anywhere as far as I can tell. We should remove that to avoid confusion with the new log level stuff.
  • It would be good if we could find a way to to have twisted.dav.fileop log.msg linked to this logging so that those messages only get written out at debug level.
  • There needs to be a way to turn accounting on for every principal, rather than just a few. Either another config item for AccountingForAllPrincipals, or treat a single "*" in the AccountingPrincipals config items as meaning account for all.
  • account.py - principal.alternativeURIs() is a tuple so that needs to be iterated over to properly enable accounting for a user.

These are all addressed now.

Also, Cyrus would prefer that logging options be in a separate config file. We can address that later if we want to; I'm not sure about it.

And Cyrus would like SIGUSR1 to toggle all logging on/back-to-normal, but I think editing the config file is easy enough. Let's duke that out later as well.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented May 7, 2008

@wsanchez originally submitted this as comment:8:⁠ticket:266


r2388 on trunk

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented May 7, 2008

@wsanchez originally submitted this as comment:9:⁠ticket:266

  • Status changed from assigned to closed
  • Resolution set to fixed

r2389 for 1.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.