Package com.jitlogic.zorka.common.util

Examples of com.jitlogic.zorka.common.util.FileTrapper


     * @param maxSize       maximum file size
     * @param logExceptions if true, stack traces of passed exceptions will be logged
     * @return file trapper
     */
    public FileTrapper rollingFileTrapper(String id, String logLevel, String path, int count, long maxSize, boolean logExceptions) {
        FileTrapper trapper = fileTrappers.get(id);

        if (trapper == null) {
            trapper = FileTrapper.rolling(ZorkaLogLevel.valueOf(logLevel), formatCfg(path), count, maxSize, logExceptions);
            trapper.start();
            fileTrappers.put(id, trapper);
        }

        return trapper;
    }
View Full Code Here


     * @param path          path to log file (excluding suffix indicating log date)
     * @param logExceptions if true, trapper will log stack traces of passed exceptions
     * @return file trapper
     */
    public FileTrapper dailyFileTrapper(String id, ZorkaLogLevel logLevel, String path, boolean logExceptions) {
        FileTrapper trapper = fileTrappers.get(id);

        if (trapper == null) {
            trapper = FileTrapper.daily(logLevel, formatCfg(path), logExceptions);
            trapper.start();
            fileTrappers.put(id, trapper);
        }

        return trapper;
    }
View Full Code Here

     * Stops and unregisters file trapper
     *
     * @param id trapper ID
     */
    public void removeFileTrapper(String id) {
        FileTrapper trapper = fileTrappers.get(id);

        if (trapper != null) {
            trapper.shutdown();
        }
    }
View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.common.util.FileTrapper

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.