Go to the documentation of this file.
19package org.sleuthkit.autopsy.actions;
21import org.sleuthkit.autopsy.coreutils.Desktop;
22import java.awt.event.ActionEvent;
23import java.awt.event.ActionListener;
25import java.io.IOException;
26import java.util.logging.Level;
27import org.openide.DialogDisplayer;
28import org.openide.NotifyDescriptor;
29import org.openide.awt.ActionID;
30import org.openide.awt.ActionReference;
31import org.openide.awt.ActionRegistration;
32import org.openide.modules.Places;
33import org.openide.util.NbBundle;
34import org.sleuthkit.autopsy.casemodule.Case;
35import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
36import org.sleuthkit.autopsy.coreutils.Logger;
46@ActionRegistration(displayName =
"#CTL_OpenLogFolder", iconInMenu =
true)
47@ActionReference(path =
"Menu/Help", position = 2000)
48@ActionID(
id =
"org.sleuthkit.autopsy.actions.OpenLogFolderAction", category =
"Help")
68 logDir =
new File(Places.getUserDirectory().getAbsolutePath() + File.separator +
"var" + File.separator +
"log");
71 logDir =
new File(Places.getUserDirectory().getAbsolutePath() + File.separator +
"var" + File.separator +
"log");
75 if (logDir.exists()) {
78 logger.log(Level.SEVERE, String.format(
"The log directory %s does not exist", logDir));
79 NotifyDescriptor notifyDescriptor =
new NotifyDescriptor.Message(
80 NbBundle.getMessage(
this.getClass(),
"OpenLogFolder.error1", logDir.getAbsolutePath()),
81 NotifyDescriptor.ERROR_MESSAGE);
82 DialogDisplayer.getDefault().notify(notifyDescriptor);
84 }
catch (IOException ex) {
85 logger.log(Level.SEVERE, String.format(
"Could not open log directory %s", logDir), ex);
86 NotifyDescriptor notifyDescriptor =
new NotifyDescriptor.Message(
87 NbBundle.getMessage(
this.getClass(),
"OpenLogFolder.CouldNotOpenLogFolder", logDir.getAbsolutePath()),
88 NotifyDescriptor.ERROR_MESSAGE);
89 DialogDisplayer.getDefault().notify(notifyDescriptor);
static final Logger logger
void actionPerformed(ActionEvent e)
String getLogDirectoryPath()
static Case getCurrentCaseThrows()
static boolean isCaseOpen()
static Desktop getDesktop()
synchronized static Logger getLogger(String name)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.