Package org.powertac.common.state
Class StateLogging
- java.lang.Object
-
- org.powertac.common.state.StateLogging
-
@Component public class StateLogging extends Object
Implement uniform state-logging using aspects. This scheme depends on two annotations: @Domain labels a class for which calls to the constructor are logged. @StateChange labels a method that must be logged (with its arguments) when it is called. Log output is a single text line consisting of the following fields, separated by double colon :: strings (assuming the log4j config puts out the msec data):- milliseconds from start of log
- class name
- instance id value
- method name ("new" for constructor)
- method arguments, separated by ::
- Author:
- John Collins
-
-
Constructor Summary
Constructors Constructor Description StateLogging()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
chainedConstructor()
void
domainConstructor()
void
newstate(org.aspectj.lang.JoinPoint jp)
void
newState()
void
readResolveMethod()
static void
setClassnameAbbreviation(boolean abbreviation)
Sets up the classname abbreviation feature.void
setstate(org.aspectj.lang.JoinPoint jp)
void
setState()
static String
unabbreviate(String origClassname)
Given a possibly abbreviated classname, returns the unabbreviated version.
-
-
-
Method Detail
-
setState
public void setState()
-
domainConstructor
public void domainConstructor()
-
readResolveMethod
public void readResolveMethod()
-
chainedConstructor
public void chainedConstructor()
-
newState
public void newState()
-
setstate
public void setstate(org.aspectj.lang.JoinPoint jp)
-
newstate
public void newstate(org.aspectj.lang.JoinPoint jp)
-
setClassnameAbbreviation
public static void setClassnameAbbreviation(boolean abbreviation)
Sets up the classname abbreviation feature. If the parameter is true, then classnames will be abbreviated. This should obviously be called before any logging happens.
-
-