AutopsySLogVizModule/src/AutopsySLogVizModule/DataContentViewerSlogViz.java
/**
    * Logs the usage of this module. With the given parameters a log file entry is created and appended to {@link USAGE_LOG_NAME}.
    * 
    * @param pathArg the file SLogViz was called with
    * @param state the plot of SLogViz that was created
    * @param timeoffset the time offset used by SLogViz
    */
Logs the usage of this module. With the given parameters a log file entry is created and appended to  USAGE_LOG_NAME.

@param pathArg the file SLogViz was called with
@param state the plot of SLogViz that was created
@param timeoffset the time offset used by SLogViz
Logs the usage of this module . With the given parameters a log file entry is created and appended to USAGE_LOG_NAME . @param pathArg the file SLogViz was called with @param state the plot of SLogViz that was created @param timeoffset the time offset used by SLogViz
private void logUsage(String pathArg, int state, String timeoffset) {
        String path = SLOGVIZ_FILE_PATH + File.separator + USAGE_LOG_NAME;
        File log = new File(path);
        boolean exists = log.exists();
        String format = "<Date and Time>: <Type of SLogViz plot(s) called>  <Handed over files> <Used time-offset>";
        BufferedWriter outBuf;
        try {
            outBuf = new BufferedWriter(new FileWriter(log, true));
        } catch (FileNotFoundException ex) {
            Logger.getLogger(DataContentViewerSlogViz.class.getName()).log(Level.SEVERE, null, ex);
            return;
        } catch (IOException ex) {
            Logger.getLogger(DataContentViewerSlogViz.class.getName()).log(Level.SEVERE, null, ex);
            return;
        }
        try { 
            Date date = new Date(); 
            String output = date + ": " + Integer.toString(state) + " " + pathArg + " " + timeoffset;
            if(!exists){
                outBuf.append(format);
                outBuf.newLine();
            }
            outBuf.append(output);
            outBuf.newLine();
        } catch (IOException ex) {
            Logger.getLogger(DataContentViewerSlogViz.class.getName()).log(Level.SEVERE, null, ex);
        }
        try {
            outBuf.flush();
            outBuf.close();
        } catch (IOException ex) {
            Logger.getLogger(DataContentViewerSlogViz.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
private void logUsage ( String pathArg , int state , String timeoffset ) { String path = SLOGVIZ_FILE_PATH + File . separator + USAGE_LOG_NAME ; File log = new File ( path ) ; boolean exists = log . exists ( ) ; String format = "<Date and Time>: <Type of SLogViz plot(s) called>  <Handed over files> <Used time-offset>" ; BufferedWriter outBuf ; try { outBuf = new BufferedWriter ( new FileWriter ( log , true ) ) ; } catch ( FileNotFoundException ex ) { Logger . getLogger ( DataContentViewerSlogViz . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; return ; } catch ( IOException ex ) { Logger . getLogger ( DataContentViewerSlogViz . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; return ; } try { Date date = new Date ( ) ; String output = date + ": " + Integer . toString ( state ) + " " + pathArg + " " + timeoffset ; if ( ! exists ) { outBuf . append ( format ) ; outBuf . newLine ( ) ; } outBuf . append ( output ) ; outBuf . newLine ( ) ; } catch ( IOException ex ) { Logger . getLogger ( DataContentViewerSlogViz . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } try { outBuf . flush ( ) ; outBuf . close ( ) ; } catch ( IOException ex ) { Logger . getLogger ( DataContentViewerSlogViz . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } }
Logs the usage of this module.
Logs the usage of this module .