All Downloads are FREE. Search and download functionalities are using the official Maven repository.

patterntesting.agent.logging.StdoutHandler Maven / Gradle / Ivy

Go to download

PatternTesting Agent (patterntesting-agent) is the agent for patterntesting-rt for classloaders which are not supported out of the box (like e.g. the classloader of the IBM JDK). With this agent patterntesting-rt is able to get the needed infos. If you use Sun's JDK you don't need it.

There is a newer version: 1.8.0
Show newest version
/*
 * $Id: StdoutHandler.java,v 1.2 2012/03/22 18:11:52 oboehm Exp $
 *
 * Copyright (c) 2012 by Oliver Boehm
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * (c)reated 17.03.2012 by oliver ([email protected])
 */

package patterntesting.agent.logging;

import java.io.OutputStream;
import java.util.logging.*;

/**
 * We want to log to stdout but the ConsoleHander of JDK logs to stderr. So
 * we must write our own handler.
 * 
 * @author oliver ([email protected])
 * @since 1.2.10-YEARS (17.03.2012)
 */
public class StdoutHandler extends StreamHandler {

    /**
     * Instantiates a new stdout handler.
     */
    public StdoutHandler() {
        this(System.out, new SingleLineFormatter());
    }

    /**
     * Instantiates a new stdout handler.
     *
     * @param out the out
     * @param formatter the formatter
     */
    public StdoutHandler(OutputStream out, Formatter formatter) {
        super(out, formatter);
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy