Package hudson.logging
Class WeakLogHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- hudson.logging.WeakLogHandler
-
public final class WeakLogHandler extends Handler
DelegatingHandler
that usesWeakReference
, which de-registers itself when an object disappears via GC.
-
-
Constructor Summary
Constructors Constructor Description WeakLogHandler(Handler target, Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
boolean
isLoggable(LogRecord record)
void
publish(LogRecord record)
void
setEncoding(String encoding)
void
setErrorManager(ErrorManager em)
void
setFilter(Filter newFilter)
void
setFormatter(Formatter newFormatter)
void
setLevel(Level newLevel)
-
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError
-
-
-
-
Method Detail
-
close
public void close() throws SecurityException
- Specified by:
close
in classHandler
- Throws:
SecurityException
-
setFormatter
public void setFormatter(Formatter newFormatter) throws SecurityException
- Overrides:
setFormatter
in classHandler
- Throws:
SecurityException
-
setEncoding
public void setEncoding(String encoding) throws SecurityException, UnsupportedEncodingException
- Overrides:
setEncoding
in classHandler
- Throws:
SecurityException
UnsupportedEncodingException
-
setFilter
public void setFilter(Filter newFilter) throws SecurityException
- Overrides:
setFilter
in classHandler
- Throws:
SecurityException
-
setErrorManager
public void setErrorManager(ErrorManager em)
- Overrides:
setErrorManager
in classHandler
-
setLevel
public void setLevel(Level newLevel) throws SecurityException
- Overrides:
setLevel
in classHandler
- Throws:
SecurityException
-
isLoggable
public boolean isLoggable(LogRecord record)
- Overrides:
isLoggable
in classHandler
-
-