Autopsy  4.13.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.coreutils.Logger Class Reference

Inherits Logger.

Static Public Member Functions

synchronized static Logger getLogger (String name)
 
synchronized static Logger getLogger (String name, String resourceBundleName)
 
synchronized static void setLogDirectory (String directoryPath)
 

Private Member Functions

 Logger (String name, String resourceBundleName)
 

Static Private Member Functions

static FileHandler createFileHandlerWithTraces (String logDirectory)
 

Static Private Attributes

static final Handler consoleHandler = new java.util.logging.ConsoleHandler()
 
static final String LOG_ENCODING = PlatformUtil.getLogFileEncoding()
 
static final String LOG_FILE_NAME = "autopsy.log"
 
static final int LOG_SIZE = 0
 
static FileHandler logFileHandler = createFileHandlerWithTraces(PlatformUtil.getLogDirectory())
 
static final Map< String, LoggernamesToLoggers = new HashMap<>()
 

Detailed Description

Autopsy specialization of the Java Logger class with a custom file handler. Note that the custom loggers are not obtained from the global log manager.

Definition at line 36 of file Logger.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.coreutils.Logger.Logger ( String  name,
String  resourceBundleName 
)
private

Constructs a customized logger.

Parameters
nameA name for the logger. This should normally be a dot-separated name based on a package name or class name.
resourceBundleNameName of ResourceBundle to be used for localizing messages for this logger. May be null.

Definition at line 160 of file Logger.java.

References org.sleuthkit.autopsy.coreutils.Version.Type.DEVELOPMENT, and org.sleuthkit.autopsy.coreutils.Version.getBuildType().

Referenced by org.sleuthkit.autopsy.coreutils.Logger.getLogger().

Member Function Documentation

static FileHandler org.sleuthkit.autopsy.coreutils.Logger.createFileHandlerWithTraces ( String  logDirectory)
staticprivate

Creates a custom file handler with a custom message formatter that includes stack traces.

Parameters
logDirectoryThe directory where the log files should reside.
Returns
A custom file handler.

Definition at line 53 of file Logger.java.

References org.sleuthkit.autopsy.core.UserPreferences.getLogFileCount().

Referenced by org.sleuthkit.autopsy.coreutils.Logger.setLogDirectory().

synchronized static Logger org.sleuthkit.autopsy.coreutils.Logger.getLogger ( String  name)
static

Finds or creates a customized logger. Hides the base class factory method.

Parameters
nameA name for the logger. This should normally be a dot-separated name based on a package name or class name.
Returns
org.sleuthkit.autopsy.coreutils.Logger instance

Definition at line 124 of file Logger.java.

Referenced by org.sleuthkit.autopsy.actions.AddBookmarkTagAction.actionPerformed(), org.sleuthkit.autopsy.actions.DeleteContentTagAction.actionPerformed(), org.sleuthkit.autopsy.actions.DeleteBlackboardArtifactTagAction.actionPerformed(), org.sleuthkit.autopsy.datamodel.Reports.ReportNode.DeleteReportAction.actionPerformed(), org.sleuthkit.autopsy.modules.hashdatabase.AddContentToHashDbAction.AddContentToHashDbMenu.addFilesToHashSet(), org.sleuthkit.autopsy.actions.AddBlackboardArtifactTagAction.addTag(), org.sleuthkit.autopsy.actions.AddContentTagAction.addTag(), org.sleuthkit.autopsy.coreutils.AppSQLiteDB.attachDatabase(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.cancel(), org.sleuthkit.autopsy.modules.hashdatabase.HashkeeperHashSetParser.close(), org.sleuthkit.autopsy.modules.hashdatabase.KdbHashSetParser.close(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.closeHashDatabases(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.configureSettings(), org.sleuthkit.autopsy.datamodel.Reports.ReportNodeFactory.createKeys(), org.sleuthkit.autopsy.datamodel.Tags.TagNameNodeFactory.createKeys(), org.sleuthkit.autopsy.datamodel.ExtractedContent.TypeFactory.createKeys(), org.sleuthkit.autopsy.datamodel.Tags.ContentTagNodeFactory.createKeys(), org.sleuthkit.autopsy.datamodel.Tags.BlackboardArtifactTagNodeFactory.createKeys(), org.sleuthkit.autopsy.datamodel.Tags.TagTypeNodeFactory.createNodeForKey(), org.sleuthkit.autopsy.datamodel.BlackboardArtifactTagNode.createSheet(), org.sleuthkit.autopsy.modules.hashdatabase.ImportCentralRepoDbProgressDialog.CentralRepoImportWorker.deleteIncompleteSet(), org.sleuthkit.autopsy.actions.GetTagNameDialog.display(), org.sleuthkit.autopsy.actions.GetTagNameAndCommentDialog.display(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDbIndexer.doInBackground(), org.sleuthkit.autopsy.livetriage.CreateLiveTriageDriveAction.CopyFilesWorker.done(), org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseProgressDialog.UnpackageWorker.done(), org.sleuthkit.autopsy.modules.hashdatabase.ImportCentralRepoDbProgressDialog.CentralRepoImportWorker.done(), org.sleuthkit.autopsy.coreutils.AppSQLiteDB.findAndCopySQLiteDB(), org.sleuthkit.autopsy.coreutils.AppSQLiteDB.findAppDatabases(), org.sleuthkit.autopsy.directorytree.DataResultFilterNode.GetPopupActionsDisplayableItemNodeVisitor.findLinked(), org.sleuthkit.autopsy.report.modules.taggedhashes.SaveTaggedHashesToHashDb.generateReport(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.getAllHashSets(), org.sleuthkit.autopsy.actions.AddTagAction.TagMenu.getAndAddTag(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.getCentralRepoHashSetsFromDatabase(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSettings(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.getKnownBadFileHashSets(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.getKnownFileHashSets(), org.sleuthkit.autopsy.ingest.IngestServices.getLogger(), org.sleuthkit.autopsy.coreutils.UNCPathUtilities.getMappedDrives(), org.sleuthkit.autopsy.coreutils.JLnkParser.getStringAt(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.getUpdateableHashSets(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupModuleSettingsPanel.isHashDbValid(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.HashSetTableModel.isValid(), org.sleuthkit.autopsy.coreutils.JLnkParser.JLnkParser(), org.sleuthkit.autopsy.coreutils.XMLUtil.loadDoc(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.loadHashsetsConfiguration(), org.sleuthkit.autopsy.coreutils.MessageNotifyUtil.MessageType.loadIcon(), org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile(), org.sleuthkit.autopsy.datamodel.ExtractedContent.ArtifactFactory.makeKeys(), org.sleuthkit.autopsy.actions.GetTagNameDialog.okButtonActionPerformed(), org.sleuthkit.autopsy.directorytree.DataResultFilterNode.GetPreferredActionsDisplayableItemNodeVisitor.openChild(), org.sleuthkit.autopsy.directorytree.DataResultFilterNode.GetPreferredActionsDisplayableItemNodeVisitor.openParent(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.propertyChange(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.removeHashDatabaseNoSave(), org.sleuthkit.autopsy.coreutils.ModuleSettings.removeProperty(), org.sleuthkit.autopsy.coreutils.XMLUtil.saveDoc(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.saveSettings(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.searchForFile(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSettings(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.updateComponentsForSelection(), org.sleuthkit.autopsy.datamodel.Tags.TagNameNode.updateDisplayName(), org.sleuthkit.autopsy.datamodel.Tags.ContentTagTypeNode.updateDisplayName(), org.sleuthkit.autopsy.datamodel.Tags.BlackboardArtifactTagTypeNode.updateDisplayName(), org.sleuthkit.autopsy.datamodel.Installer.validate(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupModuleSettingsPanel.validSetsOnly(), org.sleuthkit.autopsy.directorytree.ExplorerNodeActionVisitor.visit(), and org.sleuthkit.autopsy.coreutils.XMLUtil.xmlIsValid().

synchronized static Logger org.sleuthkit.autopsy.coreutils.Logger.getLogger ( String  name,
String  resourceBundleName 
)
static

Finds or creates a customized logger. Hides the base class factory method.

Parameters
nameA name for the logger. This should normally be a dot-separated name based on a package name or class name.
resourceBundleNameName of ResourceBundle to be used for localizing messages for this logger. May be null.
Returns
org.sleuthkit.autopsy.coreutils.Logger instance

Definition at line 141 of file Logger.java.

References org.sleuthkit.autopsy.coreutils.Logger.Logger().

synchronized static void org.sleuthkit.autopsy.coreutils.Logger.setLogDirectory ( String  directoryPath)
static

Sets the log directory where the log files will be written.

Parameters
directoryPathThe path to the desired log directory as a string.

Definition at line 89 of file Logger.java.

References org.sleuthkit.autopsy.coreutils.Logger.createFileHandlerWithTraces().

Referenced by org.sleuthkit.autopsy.casemodule.Case.close(), and org.sleuthkit.autopsy.casemodule.Case.switchLoggingToCaseLogsDirectory().

Member Data Documentation

final Handler org.sleuthkit.autopsy.coreutils.Logger.consoleHandler = new java.util.logging.ConsoleHandler()
staticprivate

Definition at line 42 of file Logger.java.

final String org.sleuthkit.autopsy.coreutils.Logger.LOG_ENCODING = PlatformUtil.getLogFileEncoding()
staticprivate

Definition at line 38 of file Logger.java.

final String org.sleuthkit.autopsy.coreutils.Logger.LOG_FILE_NAME = "autopsy.log"
staticprivate

Definition at line 40 of file Logger.java.

final int org.sleuthkit.autopsy.coreutils.Logger.LOG_SIZE = 0
staticprivate

Definition at line 39 of file Logger.java.

FileHandler org.sleuthkit.autopsy.coreutils.Logger.logFileHandler = createFileHandlerWithTraces(PlatformUtil.getLogDirectory())
staticprivate

Definition at line 43 of file Logger.java.

final Map<String, Logger> org.sleuthkit.autopsy.coreutils.Logger.namesToLoggers = new HashMap<>()
staticprivate

Definition at line 41 of file Logger.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2019 Basis Technology. Generated on: Tue Jan 7 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.