org.apache.log4j.helpers.QuietWriter Java Examples
The following examples show how to use
org.apache.log4j.helpers.QuietWriter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DatagramStringAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 6 votes |
public void setDestination(String host, int port, String encoding) { if (host==null) { LogLog.error("setDestination: host is null"); host = DEFAULT_HOST; } this.host = host; this.port = port; this.encoding = encoding; this.qw = new QuietWriter( new DatagramStringWriter(host, port, encoding), errorHandler); this.stp = new SingleLineTracerPrintWriter(qw); }
Example #2
Source File: TextPaneAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 5 votes |
public TextPaneAppender() { super(); setTextPane(new JTextPane()); createAttributes(); createIcons(); this.label=""; this.sw = new StringWriter(); this.qw = new QuietWriter(sw, errorHandler); this.tp = new TracerPrintWriter(qw); this.fancy =true; }
Example #3
Source File: TextPanelAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 5 votes |
public TextPanelAppender(Layout layout, String name) { this.layout = layout; this.name = name; this.sw = new StringWriter(); this.qw = new QuietWriter(sw, errorHandler); this.tp = new TracerPrintWriter(qw); setLogTextPanel(new LogTextPanel()); logPublisher = new LogPublishingThread(logTextPanel, Priority.ERROR, 500); //logPublisher = new LogPublishingThread(logTextPanel, null, 500); }
Example #4
Source File: CommonTestAppender.java From datawave with Apache License 2.0 | 3 votes |
public void resetLogs() { baos = new ByteArrayOutputStream(); Writer writer = new OutputStreamWriter(baos); ErrorHandler errorHandler = new CommonTestAppender.DefaultErrorHandler(this); this.qw = new QuietWriter(writer, errorHandler); }
Example #5
Source File: WriterAppender.java From logging-log4j2 with Apache License 2.0 | 3 votes |
/** * <p>Sets the Writer where the log output will go. The * specified Writer must be opened by the user and be * writable. * * <p>The <code>java.io.Writer</code> will be closed when the * appender instance is closed. * * * <p><b>WARNING:</b> Logging to an unopened Writer will fail. * <p> * * @param writer An already opened Writer. */ public synchronized void setWriter(Writer writer) { reset(); this.qw = new QuietWriter(writer, errorHandler); //this.tp = new TracerPrintWriter(qw); writeHeader(); }
Example #6
Source File: WriterAppender.java From logging-log4j2 with Apache License 2.0 | 3 votes |
/** * <p>Sets the Writer where the log output will go. The * specified Writer must be opened by the user and be * writable. * * <p>The <code>java.io.Writer</code> will be closed when the * appender instance is closed. * * * <p><b>WARNING:</b> Logging to an unopened Writer will fail. * <p> * * @param writer An already opened Writer. */ public synchronized void setWriter(Writer writer) { reset(); this.qw = new QuietWriter(writer, errorHandler); //this.tp = new TracerPrintWriter(qw); writeHeader(); }
Example #7
Source File: FileAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 2 votes |
/** Sets the quiet writer being used. This method is overriden by {@link RollingFileAppender}. */ protected void setQWForFiles(Writer writer) { this.qw = new QuietWriter(writer, errorHandler); }
Example #8
Source File: WriterAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 1 votes |
/** <p>Sets the Writer where the log output will go. The specified Writer must be opened by the user and be writable. <p>The <code>java.io.Writer</code> will be closed when the appender instance is closed. <p><b>WARNING:</b> Logging to an unopened Writer will fail. <p> @param writer An already opened Writer. */ public synchronized void setWriter(Writer writer) { reset(); this.qw = new QuietWriter(writer, errorHandler); //this.tp = new TracerPrintWriter(qw); writeHeader(); }