Class LogKeyValueBuilder

    • Method Detail

      • create

        protected static LogKeyValueBuilder create​(org.apache.logging.log4j.Logger logger,
                                                   String key)
        Create a LogKeyValueBuilder
        Parameters:
        logger - internal Logger
        key - Key
        Returns:
        a LogKeyValueBuilder
      • value

        public RecursiveLogKey value​(Object msg)
        Description copied from interface: LogKey
        Attach a value to this correspondent key.
        Specified by:
        value in interface LogKey
        Parameters:
        msg - to attach
        Returns:
        a SplunkAsLevel
      • getKey

        public String getKey()
        Returns:
        the key
      • key

        public LogKey key​(String key)
        Description copied from interface: RecursiveLogKey
        Add a key to log
        Specified by:
        key in interface RecursiveLogKey
        Parameters:
        key - key value. Can be formated with "=" or without it.
        Returns:
        SplunkLogKey
      • changeKey

        public LogKey changeKey​(String key)
        Construct a Key with '=' if not present.
        Parameters:
        key - a String
        Returns:
        a LogKey
      • asInfo

        public AsLevel asInfo()
        Description copied from interface: AsLevel
        Log information as Info
        Specified by:
        asInfo in interface AsLevel
        Returns:
        AsLevel
      • asWarn

        public AsLevel asWarn()
        Description copied from interface: AsLevel
        Log information as Warn
        Specified by:
        asWarn in interface AsLevel
        Returns:
        AsLevel
      • asError

        public AsLevel asError()
        Description copied from interface: AsLevel
        Log information as Error
        Specified by:
        asError in interface AsLevel
        Returns:
        AsLevel
      • asDebug

        public AsLevel asDebug()
        Description copied from interface: AsLevel
        Log information as Debug
        Specified by:
        asDebug in interface AsLevel
        Returns:
        AsLevel