Class InMemoryLogger
java.lang.Object
com.reposilite.journalist.backend.DefaultLogger
com.reposilite.journalist.backend.InMemoryLogger
- All Implemented Interfaces:
Journalist,Logger
Stores all messages in memory as a queue and does not print any message directly.
-
Field Summary
Fields inherited from class com.reposilite.journalist.backend.DefaultLogger
threshold -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if one of the stored messages contain the given textGet all stored messagesprotected voidinternalLog(Channel channel, String message) Internal method used byDefaultLoggerto send processed message to the final implementation.Methods inherited from class com.reposilite.journalist.backend.DefaultLogger
exception, getLogger, log, setThreshold, toPrintStream
-
Constructor Details
-
InMemoryLogger
-
InMemoryLogger
public InMemoryLogger()UsesChannel.INFOas a default threshold.
-
-
Method Details
-
internalLog
Description copied from class:DefaultLoggerInternal method used byDefaultLoggerto send processed message to the final implementation.- Specified by:
internalLogin classDefaultLogger- Parameters:
channel- the channel to log tomessage- the message to log
-
contains
Check if one of the stored messages contain the given text- Parameters:
message- the text to search for- Returns:
- true if any stored message contains the given value, otherwise false
-
getMessages
Get all stored messages- Returns:
- the list of stored messages
-