Package org.eolang.jeo
Class Logging
java.lang.Object
org.eolang.jeo.Logging
- All Implemented Interfaces:
Transformation
Logging transformation decorator.
This class wraps a transformation and adds logging functionality. It logs messages before and after applying the original transformation, including file sizes and processing time for performance monitoring.
- Since:
- 0.6.0
-
Constructor Summary
ConstructorsConstructorDescriptionLogging(String process, String participle, Transformation origin, boolean debug, Counter counter) Constructor. -
Method Summary
-
Constructor Details
-
Logging
public Logging(String process, String participle, Transformation origin, boolean debug, Counter counter) Constructor.- Parameters:
process- Process name (gerund form)participle- Past participle of the processorigin- Original transformation to wrap with loggingdebug- Enables detailed debug loggingcounter- File size counter
-
-
Method Details
-
source
Description copied from interface:TransformationThe path to the file to be transformed.- Specified by:
sourcein interfaceTransformation- Returns:
- Path to the source file
-
target
Description copied from interface:TransformationThe path to the transformed file.- Specified by:
targetin interfaceTransformation- Returns:
- Path to the target file after transformation
-
transform
public byte[] transform()Description copied from interface:TransformationTransform the file.- Specified by:
transformin interfaceTransformation- Returns:
- Transformed file content as byte array
-