Merge pull request #705 from rcordovano/log_per_case

Apply NetBeans IDE formatting to Logger class
This commit is contained in:
Richard Cordovano 2014-05-07 11:09:49 -04:00
commit 1968c08b3b

View File

@ -24,10 +24,11 @@ import java.util.logging.*;
/**
* Custom Autopsy logger wrapper over java.util.logging.Logger with default file
* streams logging to autopsy.log (general high level messages),
* autopsy_traces.log (also including exception traces).
* In development build, those are also redirected to console / messages log.
* autopsy_traces.log (also including exception traces). In development build,
* those are also redirected to console / messages log.
*
* Contains a utility method to log user actions to autopsy_actions.log via noteAction()
* Contains a utility method to log user actions to autopsy_actions.log via
* noteAction()
*
* Use like java.util.logging.Logger API, get a
* org.sleuthkit.autopsy.coreutils.Logger handle using factory method
@ -43,14 +44,11 @@ public class Logger extends java.util.logging.Logger {
private static final String LOG_DIR = PlatformUtil.getLogDirectory();
static final int LOG_SIZE = 0; // in bytes, zero is unlimited
static final int LOG_FILE_COUNT = 10;
//File Handlers which point to the output logs
private static final FileHandler traces = initTraces();
private static final FileHandler normal = initNormal();
private static final Handler console = new java.util.logging.ConsoleHandler();
private static final java.util.logging.Logger actionsLogger = initActionsLogger();
/**
* Main messages log file name
*/
@ -59,7 +57,6 @@ public class Logger extends java.util.logging.Logger {
* Detailed exception trace log file name
*/
public static final String tracesLog = "autopsy_traces.log"; //NON-NLS
/**
* Action logger file name
*/
@ -125,6 +122,7 @@ public class Logger extends java.util.logging.Logger {
/**
* Log an action to autopsy_actions.log
*
* @param actionClass class where user triggered action occurs
*/
public static void noteAction(Class<?> actionClass) {