New logging design (was Re: [Box Backup-dev] COMMIT r285 - box/chris)

Ben Summers boxbackup-dev@fluffy.co.uk
Thu, 5 Jan 2006 21:52:40 +0000


On 5 Jan 2006, at 21:40, Martin Ebourne wrote:

> On Thu, 2006-01-05 at 20:57 +0000, Ben Summers wrote:
>> Something simple which could be aspect or
>> user based would be to have an argument to configure which specifies
>> users/aspects
>>
>>    ./configure --with-specific-debug=Ben,RaidFile,Diffing
>>
>> and then
>
> That wouldn't be much use to me. I wouldn't want to rebuild the  
> RPMs to
> change the logging. What I would do is always compile my personal RPMs
> with debug enabled and then just switch it on if needed at runtime.

Maybe we'll just leave this one for later!

>
>>>> You could also implement an extra command in bbackupctl to  
>>>> change the
>>>> logging level in a running bbackupd process, which would be handy
>>>> when it's doing something you want to know more about.
>>>
>>> That could be handy. What about server side? A signal maybe?
>>
>> The existing command socket?
>
> Have I missed something? Do you mean via bbackupquery (not necessarily
> always available on a server), or via a new client just for  
> control? Or
> does bbackupctl work on the server?

Ah, I'm getting confused again. When you said "server" I assumed you  
meant bbackupd, which is a server wrt bbackupctl. I suppose we could  
use SIGUSR1 and SIGUSR2 to change logging levels generically on all  
processes. It's a pity you can't use that scheme to actually _set_ a  
specific level, but it's good enough.

Ben

PS: Thanks to whoever inadvertently fixed Box Backup on OpenBSD. :-)  
That just leaves Darwin for me to do now, and maybe the horror that  
is NetBSD if I feel that way inclined.