Package org.xwiki.logging
Class LogTreeNode
- java.lang.Object
-
- org.xwiki.logging.Message
-
- org.xwiki.logging.event.LogEvent
-
- org.xwiki.logging.event.BeginLogEvent
-
- org.xwiki.logging.LogTreeNode
-
- All Implemented Interfaces:
Serializable
,CharSequence
,Iterable<LogEvent>
,BeginEvent
,Event
- Direct Known Subclasses:
LogTree
public class LogTreeNode extends BeginLogEvent implements Iterable<LogEvent>, Serializable
Logs organized as a tree.- Since:
- 5.4M1
- Version:
- $Id: 11e0236a0ab567bdd4f68973dc861fec619111a7 $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ConcurrentLinkedQueue<LogEvent>
children
The children of this log event.-
Fields inherited from class org.xwiki.logging.event.LogEvent
MARKER_BEGIN, MARKER_END
-
-
Constructor Summary
Constructors Constructor Description LogTreeNode(LogEvent logEvent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<LogEvent>
getLogs(LogLevel level, boolean recurse)
Filter logs of a specific level.List<LogEvent>
getLogsFrom(LogLevel level, boolean recurse)
Filter logs of a specific level.Iterator<LogEvent>
iterator()
Iterator<LogEvent>
iterator(boolean recurse)
int
size(boolean recurse)
The number of logs.-
Methods inherited from class org.xwiki.logging.event.LogEvent
equals, getLevel, getTimeStamp, hashCode, log, matches, toString
-
Methods inherited from class org.xwiki.logging.Message
charAt, equals, getArgumentArray, getFormattedMessage, getMarker, getMessage, getMessageElements, getThrowable, getTranslationKey, length, subSequence
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
children
protected ConcurrentLinkedQueue<LogEvent> children
The children of this log event.
-
-
Constructor Detail
-
LogTreeNode
public LogTreeNode(LogEvent logEvent)
- Parameters:
logEvent
- the log event to copy
-
-
Method Detail
-
iterator
public Iterator<LogEvent> iterator(boolean recurse)
- Parameters:
recurse
- if true navigate through the whole tree, otherwise only the first level- Returns:
- an iterator over a tree of logs
-
size
public int size(boolean recurse)
The number of logs.- Parameters:
recurse
- if true navigate through the whole tree, otherwise only the first level- Returns:
- the number of log events
-
getLogs
public List<LogEvent> getLogs(LogLevel level, boolean recurse)
Filter logs of a specific level.- Parameters:
level
- the level of the logs to returnrecurse
- if one of theLogEvent
is a node look at its children too etc.- Returns:
- the filtered logs
-
-