Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The requirement to log method entries and exits specified in the Logging Concept is automatically implemented by the LoggingAspect class inside the taskana.common.logging module-common-logging module. If you don’t want to use the LoggingAspect you can deactivate it by deactivating the aspectj-logging profile by providing the property -DskipAspectJ.

Furthermore you need to set the system property enableLoggingAspect to true in order to activate the automatic TRACE logging.

Compile-Time Weaving

To In order to use the automatic TRACE logging it is necessary to have the source code of and the module to be logged and the LoggingAspect by compiling these two modules. There are two options to compile these modules:AspectJ LoggingAspect have to be combined together in a process called weaving. You have to compile the taskana-common-logging module first. Afterwards compile your desired module and set the log level to TRACE.

expand
Expand
titleUse the following maven commands
  1. mvn compile -pl :taskana-common-loggingmvn compile -pl ,:<your module>

  2. or simply mvn compile if you want to use the LoggingAscept for the entire project

titleApply the following run configuration to your module to automatically compile both modules
Image RemovedImage Removed
Info

If you are changing the LoggingAspect you may need to additionally use the following commandmodify something within the taskana-common-logging module you probably have to install it again. Use:

mvn install -pl :taskana-common-logging -DskipTests -Dcheckstyle.skip

Testing

AspectJ is not required for testing in general. However, for running the LoggingAsceptTest you first need to build the project and then run the test with Delegate IDE build/run actions to Maven enabled.

...