Java slf4j Logger logArgs(final Logger logger, final Object[] args)

Here you can find the source of logArgs(final Logger logger, final Object[] args)

Description

log Args

License

Open Source License

Declaration

public static void logArgs(final Logger logger, final Object[] args) 

Method Source Code


//package com.java2s;
/*//www  . j  a  v  a  2  s .  c o  m
 * Copyright (c) 2014, the original author or authors.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * A copy of the GNU General Public License accompanies this software,
 * and is also available at http://www.gnu.org/licenses.
 */

import org.slf4j.Logger;

public class Main {
    public static void logArgs(final Logger logger, final Object[] args) {
        final String orderedBlend = args[0].toString();

        logger.debug("Ordered blend: {}.", orderedBlend);

        if (args.length == 2) {
            final String orderedFlavor = args[1].toString();

            logger.debug("Ordered flavor: {}.", orderedFlavor);
        }
    }
}

Related

  1. log(Logger logger, int logLevel, String value)
  2. log(Logger logger, Throwable t)
  3. log(String format, Object... arguments)
  4. log(String message)
  5. logAndIdError(Logger log, String errorMessage)
  6. logBind(Logger log, int index, Object value)
  7. logBytes(byte[] data, int length, String prefix, Logger logger)
  8. logDebug(Logger logger, String mensagem, Object... params)
  9. logDebug(String string)