Package com.yahoo.log

Class VespaFormatter


  • public class VespaFormatter
    extends SimpleFormatter
    This class implements a log formatter which takes care of formatting messages according to the VESPA common log format.
    Author:
    Bjorn Borud, arnej27959
    • Constructor Detail

      • VespaFormatter

        public VespaFormatter()
        Default constructor
      • VespaFormatter

        public VespaFormatter​(String serviceName,
                              String componentPrefix)
        Parameters:
        serviceName - The VESPA service name.
        componentPrefix - The application name.
    • Method Detail

      • unEscape

        public static String unEscape​(String s)
        Un-escapes previously escaped string. note: look at com.yahoo.config.StringNode.unescapeQuotedString()
        Parameters:
        s - String that might need un-escaping
        Returns:
        Returns un-escaped string
      • setServiceName

        public void setServiceName​(String serviceName)
        Set the service name (usually the VESPA config-id) of this formatter.
        Parameters:
        serviceName - The service name
      • getServiceName

        public String getServiceName()
        Get the service name for this formatter.
        Returns:
        Returns the service name.