Class ServiceLogUtils


  • public class ServiceLogUtils
    extends Object
    Helper class exposing utilities to the Service Logs Streaming component.
    • Constructor Detail

      • ServiceLogUtils

        public ServiceLogUtils()
    • 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