org.springframework.shell.core
Class JLineLogHandler
java.lang.Object
java.util.logging.Handler
org.springframework.shell.core.JLineLogHandler
public class JLineLogHandler
- extends Handler
JDK logging Handler
that emits log messages to a JLine ConsoleReader
.
- Since:
- 1.0
Methods inherited from class java.util.logging.Handler |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JLineLogHandler
public JLineLogHandler(jline.ConsoleReader reader,
ShellPromptAccessor shellPromptAccessor)
flush
public void flush()
- Specified by:
flush
in class Handler
close
public void close()
throws SecurityException
- Specified by:
close
in class Handler
- Throws:
SecurityException
prohibitRedraw
public static void prohibitRedraw()
cancelRedrawProhibition
public static void cancelRedrawProhibition()
setIncludeThreadName
public static void setIncludeThreadName(boolean include)
resetMessageTracking
public static void resetMessageTracking()
isSuppressDuplicateMessages
public static boolean isSuppressDuplicateMessages()
setSuppressDuplicateMessages
public static void setSuppressDuplicateMessages(boolean suppressDuplicateMessages)
publish
public void publish(LogRecord record)
- Specified by:
publish
in class Handler
getANSIBuffer
public static jline.ANSIBuffer getANSIBuffer()
- Makes text brighter if requested through system property 'roo.bright' and
works around issue on Windows in using reverse() in combination with the
Jansi lib, which leaves its 'negative' flag set unless reset explicitly.
- Returns:
- new patched ANSIBuffer