[Box Backup] Logging

Chris Wilson boxbackup@fluffy.co.uk
Thu, 18 May 2006 21:38:46 +0000 (GMT)


Hi Pete,

> There are a few log-relatd feature requests at: 
> http://boxbackup.hostworks.ca/index.php/Feature_requests Some are more 
> obviously log-related than others.  Stuart's and mine there are 
> definitely.

Thanks for pointing that out. I guess you mean the following requests:

1. Prefix bbstored log messages with the client account number
2. In Windows Event Viewer, change "Exceeded storage limits" to Warning
3. Log good and bad results of proposed housekeeping health check
4. Log "not uploading changes to files" when appropriate on the store
5. Log amount of bandwidth used by each client session (if not already)

Did I miss any?

The first two are definitely related to the logging infrastructure.

For number 1, I've added a little bit to the logging spec 
(SetContext/ClearContext) which would make it easy to log this information 
in bbstored.

Number 2 is trivial, I've just checked it into my tree.

Numbers 3-5 require additional work to other parts of the store daemon, 
which would then use the new logging infrastructure. I'm not proposing to 
implement these right now.

> Traffic related?

By traffic related, do you mean logging the amount of bandwidth used?

> Client vs server logging differences?

"Client" and "server" are tricky terms to use here. Both bbackupd and 
bbstored run as daemons, and their principle means of logging should be 
syslog. As you correctly pointed out, bbstored handles multiple clients, 
so it should identify messages that relate to a particular client with the 
client's account number. Apart from that, I can't see any obvious reason 
for differences.

On the other hand, the command-line utilities, like bbackupquery and 
bbackupctl, would probably use the console logger exclusively, rather than 
logging anything to syslog. Does that make sense to everyone? Should there 
be a flag to make them log to syslog, for example to run them as scheduled 
tasks on Windows where there's no Cron?

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |