com.sun.electric.tool.user
Class ActivityLogger

java.lang.Object
  extended by com.sun.electric.tool.user.ActivityLogger

public class ActivityLogger
extends java.lang.Object

Class to log job activity.


Constructor Summary
ActivityLogger()
           
 
Method Summary
static void finished()
          Call to close output writer and warn user if any exceptions were logged.
static void initialize(java.lang.String fileName, boolean logMenuActivations, boolean logJobs, boolean useTimeStamps)
          Initialize the Activity Logger
static void logException(java.lang.Throwable e)
          Log an Exception.
static void logHighlights(java.util.List<Highlight2> highlights, java.awt.geom.Point2D offset)
          Log a list of Highlight objects and their offset
static void logJobStarted(java.lang.String jobName, Job.Type jobType, Cell cell, java.util.List<Highlight2> savedHighlights, java.awt.geom.Point2D savedHighlightsOffset)
          Log a Job.
static void logMenuActivated(java.lang.String menuDescription)
          Log a menu activation
static void logMessage(java.lang.String msg)
          Log some message
static void logThreadMessage(java.lang.String msg)
          Temp debug method
static void logTime(long time)
          Log the time
static void logToolBarButtonActivated(java.lang.String buttonName)
          Log a tool bar button activation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityLogger

public ActivityLogger()
Method Detail

initialize

public static void initialize(java.lang.String fileName,
                              boolean logMenuActivations,
                              boolean logJobs,
                              boolean useTimeStamps)
Initialize the Activity Logger

Parameters:
logMenuActivations - true to log menu activations
logJobs - true to log jobs starting
useTimeStamps - true to include time stamps (not recommended, makes file harder to read)

finished

public static void finished()
Call to close output writer and warn user if any exceptions were logged.


logMenuActivated

public static void logMenuActivated(java.lang.String menuDescription)
Log a menu activation

Parameters:
menuDescription - description of the menu activated

logToolBarButtonActivated

public static void logToolBarButtonActivated(java.lang.String buttonName)
Log a tool bar button activation

Parameters:
buttonName - the tool bar button activated

logJobStarted

public static void logJobStarted(java.lang.String jobName,
                                 Job.Type jobType,
                                 Cell cell,
                                 java.util.List<Highlight2> savedHighlights,
                                 java.awt.geom.Point2D savedHighlightsOffset)
Log a Job. Logs at the start of the job, and also logs the highlights at the time the job started.

Parameters:
jobName - the job name
jobType - the job type
cell - the current cell
savedHighlights - the starting highlights
savedHighlightsOffset - the starting highlight offset (currently not used)

logHighlights

public static void logHighlights(java.util.List<Highlight2> highlights,
                                 java.awt.geom.Point2D offset)
Log a list of Highlight objects and their offset

Parameters:
highlights - a list of Highlight objects
offset - the offset

logTime

public static void logTime(long time)
Log the time

Parameters:
time - the current time in milliseconds (System.currentTimeMillis)

logException

public static void logException(java.lang.Throwable e)
Log an Exception. If an exception is logged, the user is prompted when Electric exits to send the log file to a developer.

Parameters:
e - the exeception

logMessage

public static void logMessage(java.lang.String msg)
Log some message

Parameters:
msg - the message

logThreadMessage

public static void logThreadMessage(java.lang.String msg)
Temp debug method