On Tue, Jul 8, 2008 at 2:20 PM, Eduard Bloch <[EMAIL PROTECTED]> wrote:
> #include <hallo.h>
> * Theppitak Karoonboonyanan [Mon, Jul 07 2008, 05:35:27PM]:
>> Package: apt-cacher-ng
>> Version: 0.2-1
>> Severity: minor
>>
>> In many situations, it should be useful to be able to keep track of what
>> apt-cacher-ng is doing at real time, not even for serious debugging.
>> For example, to monitor successful downloads for long-waited files.
>> It shouldn't require setting extra debug level to see real-time logs.
>
> ??
>
> For serious debugging, you just set debug level, at least to 1. For fun
> debugging there is no point because you won't get realtime information;
> ATM the log stores the transfered size, and you get it only when the
> file is finished.
>
> So what exactly do you wish? More log entries, e.g. when a download is
> started and when it ends?

Whatever it logs should be immediately flushed.

By 'tail -f /var/log/apt-cacher.log', one still sees incomplete lines due to
buffering, or many lines flushed at once, rather than in sync with each
finished transfer, unless debug level is set to at least 4.

In source/aclogger.cc (transfer()):

        fprintf(fStat, acfg::verboselog ? "%lu|%c|%"PRIu64"|%s|%s\n" :
"%lu|%c|%"PRIu64"\n",
                        (unsigned long) time(NULL), bDirIn ? 'I' : 'O', nCount,
                                        szClient, szPath);

        if(acfg::debug>3)
                fflush(fStat);

Why fflush(fStat) only on debug > 3? Why not always?

Regards,
-- 
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to