Class ServiceLogUtils
- java.lang.Object
-
- cz.xtf.core.service.logs.streaming.ServiceLogUtils
-
public class ServiceLogUtils extends Object
Helper class exposing utilities to the Service Logs Streaming component.
-
-
Field Summary
Fields Modifier and Type Field Description static StringXTF_SLS_HEADER_LABEL
-
Constructor Summary
Constructors Constructor Description ServiceLogUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringformatStreamedLogLine(String prefix)Formats the given prefix into a conventional header for a any streamed log line so that it is clear to the end user that it is coming from a service log rather than from the current process onestatic StringgetConventionallyPrefixedLogMessage(String originalMessage)Adds a prefix to the message which is passed in, in order to display that it is part of the logs streaming process, i.e.
-
-
-
Field Detail
-
XTF_SLS_HEADER_LABEL
public static final String XTF_SLS_HEADER_LABEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConventionallyPrefixedLogMessage
public static String getConventionallyPrefixedLogMessage(String originalMessage)
Adds a prefix to the message which is passed in, in order to display that it is part of the logs streaming process, i.e. by adding a conventional part to the beginning of the message.- Parameters:
originalMessage- the original message- Returns:
- A string made up by the conventional prefix, followed by the original message
-
formatStreamedLogLine
public static String formatStreamedLogLine(String prefix)
Formats the given prefix into a conventional header for a any streamed log line so that it is clear to the end user that it is coming from a service log rather than from the current process one- Parameters:
prefix- The prefix that will be part of the header- Returns:
- A string representing the header for a streamed log line which will be written to the output stream
-
-