Package org.jboss.logmanager.handlers

Examples of org.jboss.logmanager.handlers.ConsoleHandler


    private Filter filter;

    private ConsoleHandler value;

    public synchronized void start(final StartContext context) throws StartException {
        final ConsoleHandler handler = new ConsoleHandler();
        value = handler;
        formatterSpec.apply(handler);
        setTarget(handler, target);
        if (level != null) handler.setLevel(level);
        if (filter != null) handler.setFilter(filter);
        handler.setAutoFlush(autoflush);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
    }
View Full Code Here


            }
        }
    }

    public synchronized void stop(final StopContext context) {
        final ConsoleHandler handler = value;
        handler.close();
        value = null;
    }
View Full Code Here

        return level;
    }

    public synchronized void setLevel(final Level level) {
        this.level = level;
        final ConsoleHandler handler = value;
        if (handler != null) handler.setLevel(level);
    }
View Full Code Here

        return formatterSpec;
    }

    public synchronized void setFormatterSpec(final AbstractFormatterSpec formatterSpec) {
        this.formatterSpec = formatterSpec;
        final ConsoleHandler handler = value;
        if (handler != null) formatterSpec.apply(handler);
    }
View Full Code Here

    }

    @Override
    public synchronized void setFilter(final Filter filter) {
        this.filter = filter;
        final ConsoleHandler handler = value;
        if (handler != null) handler.setFilter(filter);
    }
View Full Code Here

        return autoflush;
    }

    public synchronized void setAutoflush(final boolean autoflush) {
        this.autoflush = autoflush;
        final ConsoleHandler handler = value;
        if (handler != null) handler.setAutoFlush(autoflush);
    }
View Full Code Here

    public synchronized String getEncoding() {
        return encoding;
    }

    public synchronized void setEncoding(final String encoding) throws UnsupportedEncodingException {
        final ConsoleHandler handler = value;
        if (handler != null) handler.setEncoding(encoding);
        this.encoding = encoding;
    }
View Full Code Here

    private String encoding;

    private ConsoleHandler value;

    public synchronized void start(final StartContext context) throws StartException {
        final ConsoleHandler handler = new ConsoleHandler();
        value = handler;
        formatterSpec.apply(handler);
        setTarget(handler, target);
        if (level != null) handler.setLevel(level);
        handler.setAutoFlush(autoflush);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
    }
View Full Code Here

            }
        }
    }

    public synchronized void stop(final StopContext context) {
        final ConsoleHandler handler = value;
        handler.close();
        value = null;
    }
View Full Code Here

        return level;
    }

    public synchronized void setLevel(final Level level) {
        this.level = level;
        final ConsoleHandler handler = value;
        if (handler != null) handler.setLevel(level);
    }
View Full Code Here

TOP

Related Classes of org.jboss.logmanager.handlers.ConsoleHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.