On Friday 30 Mar 2012 22:28:09 Marco Schulze wrote:
> On 30-03-2012 13:28, Matthew Toseland wrote:
> > On Sunday 25 Mar 2012 23:22:24 Marco Schulze wrote:
> >> Working (but incomplete) code is available @
> >> https://github.com/Heiral/fred-staging/tree/logger++
> > I'm keeping out of this for now, it should go in if it:
> > - Simplifies the code.
> Testing is centralized inside Log.isLoggable() and Log.write(). No 
> callbacks or registering is needed, and mistakes in current code is 
> mitigated (i.e. testing for one log level, and actually logging in 
> another). IMHO, cutting ~5000 lines from the code, and ~200k from the 
> jar speaks for itself.
> 
> > - Does not significantly reduce performance.
> Until fred actually uses lazy toString() in log calls, that'll be 
> unknown. Lazyness already works, though.
> 
> > - Does not significantly reduce debuggability (i.e. we need to be able to 
> > use wildcards).
> In to do list.
> 
> > - Reacts quickly enough (~1 second) to config changes.
> All but adding per-class filtering should be quick enough.
> 
> > - Does not create a locking hotspot.
> Only the OutputStream is locked. Mitigated by possible async option.

Async is essential, otherwise you have the mother of all lock contention 
problems: if you don't buffer it, a system call; if you do buffer it, best case 
is lock contention, worst case is a system call.

So AFAICS we need to keep most of the current FileLoggerHook. :|
> >
> > Haven't reviewed the code yet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20120402/78e0f6ed/attachment.pgp>

Reply via email to