Projects
Wiki     Timeline     Roadmap     Browse Source     View Tickets     New Ticket     Search

Ticket #266 (closed Defect: Software changed)

Opened 5 years ago

Last modified 9 months ago

More flexible logging.

Reported by: wsanchez@… Owned by: wsanchez@…
Priority: 2: Expected Milestone: CalendarServer-1.3
Component: Calendar Server Severity: Other
Keywords: review Cc: kurt.leubner@…
Port:

Description

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.

Change History

comment:1 Changed 5 years ago by wsanchez@…

  • 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

comment:3 Changed 5 years ago by wsanchez@…

comment:4 Changed 5 years ago by wsanchez@…

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

comment:5 Changed 5 years ago by wsanchez@…

Adding text here to test email to dev list.

comment:6 Changed 5 years ago by wsanchez@…

  • Keywords review added

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

comment:7 Changed 5 years ago by wsanchez@…

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.

comment:8 Changed 5 years ago by wsanchez@…

r2388 on trunk

comment:9 Changed 5 years ago by wsanchez@…

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

r2389 for 1.3

comment:10 Changed 9 months ago by kurt.leubner@…

  • Cc kurt.leubner@… added

Cc Me!

Note: See TracTickets for help on using tickets.