Class LoggingSupport


  • public class LoggingSupport
    extends Object
    Utility for emitting log messages in the Spotify log format.
    • Constructor Detail

      • LoggingSupport

        public LoggingSupport()
    • Method Detail

      • debug

        public static void debug​(org.slf4j.Logger logger,
                                 String type,
                                 int version,
                                 @Nullable
                                 LoggingSupport.Ident ident,
                                 Object... args)
        Generate a new debug log message according to the Spotify log format.
        Parameters:
        logger - Which Logger to use for writing the log messages. It is assumed that this Logger is already set up via com.spotify.logging.LoggingConfigurator and a [service]-log4j.xml configuration so that the time stamp, hostname, service, and process ID portions of the log message are automatically prepended.
        type - Log message type. Log messages are defined in the messages.py module in the log-parser git project. When a new message type is added or changed in a service, it should also be changed/added in messages.py.
        version - Version of the log message. This is incremented by callers and in messages.py if the format of a given log message type is changed.
        ident - Ident object to give information generally about a client who made the request that resulted in this message.
        args - Additional arguments that will be converted to strings, escaped, and appended (tab-separated) after the log message type and version number.