Package net.i2p.util
Class LogConsoleBuffer
java.lang.Object
net.i2p.util.LogConsoleBuffer
Offer a glimpse into the last few console messages generated.
Maintains two buffers, one normal and one critical.
-
Constructor Summary
ConstructorDescriptionLogConsoleBuffer
(int limit) LogConsoleBuffer
(I2PAppContext context) Uses default limit from LogManager. -
Method Summary
Modifier and TypeMethodDescription(package private) void
(package private) void
addCritical
(String msg) Only adds to the critical buffer, not to both.void
clear()
Retrieve the currently buffered critical messages, earlier values were generated...Retrieve the currently buffered critical messages, earlier values were generated...Retrieve the currently buffered messages, earlier values were generated...Retrieve the currently buffered messages, earlier values were generated...
-
Constructor Details
-
LogConsoleBuffer
Uses default limit from LogManager. As of 0.8.8, limit is not checked at runtime.- Parameters:
context
- unused
-
LogConsoleBuffer
public LogConsoleBuffer(int limit) - Parameters:
limit
- max size of each buffer In theory the limit is configurable, but it isn't in the UI, so set it at construction.- Since:
- 0.8.8
-
-
Method Details
-
add
-
addCritical
Only adds to the critical buffer, not to both. -
getMostRecentMessages
Retrieve the currently buffered messages, earlier values were generated... earlier. All values are strings with no formatting (as they are written in the logs)- Returns:
- oldest first
-
getMostRecentCriticalMessages
Retrieve the currently buffered critical messages, earlier values were generated... earlier. All values are strings with no formatting (as they are written in the logs)- Returns:
- oldest first
-
getUIMessages
Retrieve the currently buffered messages, earlier values were generated... earlier. All values are strings with no formatting (as they are written in the logs)- Returns:
- oldest first
- Since:
- 0.9.46
-
getCriticalUIMessages
Retrieve the currently buffered critical messages, earlier values were generated... earlier. All values are strings with no formatting (as they are written in the logs)- Returns:
- oldest first
- Since:
- 0.9.46
-
clear
public void clear()- Since:
- 0.8.8
-