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 // NOTE: This test class contains intentional checkstyle issues, for CheckstyleTest
15 public class CheckLoggingTestClass {
16 final Logger logger = LoggerFactory.getLogger(CheckstyleTest.class);
17 private static final java.util.logging.Logger LOG2 = java.util.logging.Logger.getGlobal();
18 private static final Logger LOG = LoggerFactory.getLogger(CheckLoggingTestClass.class);
21 logger.debug("foo + bar {}", "foo");
22 } catch(Exception e) {
24 System.out.println(e.getMessage());
25 System.err.print(e.getMessage());
26 logger.debug("foo {}", "bar", e);
27 LOG.info("foo {} {}", e.getMessage(), e);
31 public void bar(String string, IllegalArgumentException e) {
33 LOG.warn("foo {}", e);
34 LOG.warn("foo", string);
35 LOG.warn("foo {}", string);
36 LOG.warn("foo {}", string, e);
38 "Unable to parse configuration snapshot from {}. Initial config from {} will be IGNORED in this run. " +
39 "Note that subsequent config files may fail due to this problem. " +
40 "Xml markup in this file needs to be fixed, for detailed information see enclosed exception.",
42 LOG.warn("foo" + string);
43 LOG.warn("foo" + "bar");
44 LOG.warn("foo" + "bar" + "bar");