/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/**
* Util class to set up Logging using the Console and FileLog formatter classes
*
* @author Jan S Berg
*/
@SuppressWarnings({"PMD.MoreThanOneLogger", "PMD.SystemPrintln", "PMD.AvoidThrowingRawExceptionTypes"})
public final class OpenGrokLogger {
return filepath;
}
return log;
}
if (h instanceof ConsoleHandler) {
}
}
}
return consoleLevel;
}
/**
*
* @param level new level for console
*/
e.hasMoreElements();) {
Handler[] h = l.getHandlers();
for (int i = 0; i < h.length; ++i) {
if (hi instanceof ConsoleHandler) {
}
}
}
h = l.getHandlers();
}
}
if (h instanceof FileHandler) {
}
}
}
return fileLevel;
}
throw new IOException("could not make logpath: " +
jlp.getAbsolutePath());
}
}
} else {
}
if (h instanceof FileHandler) {
LOGFILESIZELIMIT, // size (unlimited)
LOGFILESCOUNT); // # rotations
}
}
}
public static String setupLogger(String logpath, Level filelevel, Level consolelevel) throws IOException {
throw new RuntimeException("could not make logpath: " +
jlp.getAbsolutePath());
}
}
}
} else {
}
try {
LOGFILESIZELIMIT, // size (unlimited)
LOGFILESCOUNT); // # rotations
}
return logpath;
}
private static void clearForeignHandlers() {
e.hasMoreElements();) {
Handler[] h = l.getHandlers();
for (int i = 0; i < h.length; ++i) {
l.removeHandler(h[i]);
}
}
h = l.getHandlers();
}
}
private OpenGrokLogger() {
}
}