Examples of WriterTarget


Examples of org.apache.log.output.io.WriterTarget

    }
    Hierarchy.getDefaultHierarchy().setDefaultLogTarget(target);
  }

  private static LogTarget getTarget(Writer targetFile, PatternFormatter fmt) {
    return new WriterTarget(targetFile, fmt);
  }
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

            final PatternFormatter appformatter = new PatternFormatter(prop
                    .getProperty("logs.pattern.application"));

            LogTarget[] appLoggerTargets = new LogTarget[writeToFile ? 2 : 1];

            appLoggerTargets[0] = new WriterTarget(new PrintWriter(System.out),
                    appformatter);
            if (writeToFile) {
                //   open file target in append mode
                final File appfile = new File(prop.getProperty("logs.dir")
                        + File.separator + IConst.LOG.APPLICATION_LOG_NAME);
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

        private StringWriter wr = null;

        private void divertLog() {// N.B. This needs to divert the log for SampleResult
            wr = new StringWriter(1000);
            LogTarget[] lt = { new WriterTarget(wr, fmt) };
            SampleResult.log.setLogTargets(lt);
        }
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

                setPriority(appProperties.getProperty(prop), category);
            }
            if (prop.startsWith(LOG_FILE + ".")) { //$NON_NLS-1$
                String category = prop.substring(LOG_FILE.length() + 1);
                String file = appProperties.getProperty(prop);
                setTarget(new WriterTarget(makeWriter(file, prop), getFormat()), category);
            }
        }
    }
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

        }
        Hierarchy.getDefaultHierarchy().setDefaultLogTarget(target);
    }

    private static LogTarget getTarget(Writer targetFile, PatternFormatter fmt) {
        return new WriterTarget(targetFile, fmt);
    }
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

        private StringWriter wr = null;

        private void divertLog() {// N.B. This needs to divert the log for SampleResult
            wr = new StringWriter(1000);
            LogTarget[] lt = { new WriterTarget(wr, fmt) };
            SampleResult.log.setLogTargets(lt);
        }
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

                setPriority(appProperties.getProperty(prop), category);
            }
            if (prop.startsWith(LOG_FILE + ".")) { //$NON_NLS-1$
                String category = prop.substring(LOG_FILE.length() + 1);
                String file = appProperties.getProperty(prop);
                setTarget(new WriterTarget(makeWriter(file, prop), getFormat()), category);
            }
        }
    }
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

        }
        Hierarchy.getDefaultHierarchy().setDefaultLogTarget(target);
    }

    private static LogTarget getTarget(Writer targetFile, PatternFormatter fmt) {
        return new WriterTarget(targetFile, fmt);
    }
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

        private StringWriter wr = null;

        private void divertLog() {// N.B. This needs to divert the log for SampleResult
            wr = new StringWriter(1000);
            LogTarget[] lt = { new WriterTarget(wr, fmt) };
            SampleResult.log.setLogTargets(lt);
        }
View Full Code Here

Examples of org.apache.log.output.io.WriterTarget

        private StringWriter wr = null;

        private void divertLog() {// N.B. This needs to divert the log for SampleResult
            wr = new StringWriter(1000);
            LogTarget[] lt = { new WriterTarget(wr, fmt) };
            SampleResult.log.setLogTargets(lt);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.