jetbrains.buildServer.serverSide.buildLog
Interface BuildLogReader

All Known Subinterfaces:
BuildLog

public interface BuildLogReader

Reader for build log.


Method Summary
 java.util.List<LogMessage> getDefaultFilteredMessages()
          Returns messages accepted by default filter.
 java.util.List<LogMessage> getErrorMessages()
          Returns messages accepted by LogMessageFilter.ProblemsFilter.
 java.util.List<LogMessage> getFilteredMessages(LogMessageFilter filter)
          Returns list of messages accepted by specified filter.
 java.util.Date getLastMessageTimestamp()
          Returns timestamp of the last logged message.
 java.util.List<LogMessage> getMessages()
          Deprecated. Since constructing of list of all messages can be memory consuming it is recommended to use getMessagesIterator() method instead.
 java.util.Iterator<LogMessage> getMessagesIterator()
          Returns iterator over log messages.
 boolean isClosed()
           
 

Method Detail

getMessagesIterator

java.util.Iterator<LogMessage> getMessagesIterator()
Returns iterator over log messages. Build log messages form a tree which is iterated as follows: iterator walks down the tree until it meets a leaf, then it seeks whether parent of the leaf has siblings and iterate over them, moving down to their children if needed and so on. In other words this iterator iterates over all messages in the tree in order of their appearance.

Each log message has parent, so while iterating down the tree it is possible to go up to the topmost parent. You can obtain level in the tree for each message with help of LogMessage.getLevel() method.

Returns:
iterator by log messages.

getMessages

java.util.List<LogMessage> getMessages()
Deprecated. Since constructing of list of all messages can be memory consuming it is recommended to use getMessagesIterator() method instead.

Returns all messages as list in order of their appearance.

Returns:
all messages as list in order of their appearance.

getDefaultFilteredMessages

java.util.List<LogMessage> getDefaultFilteredMessages()
Returns messages accepted by default filter. See LogMessageFilter.DefaultFilter.

Returns:
messages accepted by default filter

getErrorMessages

java.util.List<LogMessage> getErrorMessages()
Returns messages accepted by LogMessageFilter.ProblemsFilter.

Returns:
messages accepted by LogMessageFilter.ProblemsFilter.

getFilteredMessages

java.util.List<LogMessage> getFilteredMessages(LogMessageFilter filter)
Returns list of messages accepted by specified filter.

Parameters:
filter - filter for messages
Returns:
messages accepted by filter.

isClosed

boolean isClosed()
Returns:
true if this build log was closed

getLastMessageTimestamp

@Nullable
java.util.Date getLastMessageTimestamp()
Returns timestamp of the last logged message.

Returns:
timestamp or null if there were no messages yet.
Since:
6.0