sdiz commit 006d85dbcd31ffce94279667f5e9ab62d054c9cf
diff --git a/src/freenet/client/ArchiveHandlerImpl.java
b/src/freenet/client/ArchiveHandlerImpl.java
index 56a9b81..e8046ca 100644
--- a/src/freenet/client/ArchiveHandlerImpl.java
+++ b/src/freenet/client/ArchiveHandlerImpl.java
@@ -24,13 +24,7 @@ class ArchiveHandlerImpl implements ArchiveHandler {
private static volatile boolean logMINOR;
static {
- Logger.registerLogThresholdCallback(new LogThresholdCallback()
{
-
- @Override
- public void shouldUpdate() {
- logMINOR = Logger.shouldLog(Logger.MINOR,
this);
- }
- });
+ Logger.registerClass(ArchiveHandlerImpl.class);
}
private final FreenetURI key;
Etc.
Logger.registerClass uses JNI and weak references, it is a great thing. It
could simplify much code as above, but shouldUpdate() is slow because of JNI.
Given we very rarely change logging settings, is that a problem? How long
would it take to run the JNI hooks on every class? If it's less than 100ms or
so, we should use this everywhere.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20090505/3462b81d/attachment.pgp>