2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.yangtools.checkstyle;
11 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory;
14 public class CheckLoggingTestClass {
15 final Logger logger = LoggerFactory.getLogger(CheckstyleTest.class);
16 private static final java.util.logging.Logger LOG2 = java.util.logging.Logger.getGlobal();
17 private static final Logger LOG = LoggerFactory.getLogger(CheckLoggingTestClass.class);
20 logger.debug("foo + bar {}", "foo");
21 } catch(Exception e) {
23 System.out.println(e.getMessage());
24 System.err.print(e.getMessage());
25 logger.debug("foo {}", "bar", e);
26 LOG.info("foo {} {}", e.getMessage(), e);
30 public void bar(String string, IllegalArgumentException e) {
32 LOG.warn("foo {}", e);
33 LOG.warn("foo", string);
34 LOG.warn("foo {}", string);
35 LOG.warn("foo {}", string, e);