Package org.eolang.jeo
Class Logging
- java.lang.Object
-
- org.eolang.jeo.Logging
-
- All Implemented Interfaces:
Transformation
public final class Logging extends Object implements 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
Constructors Constructor Description Logging(String process, String participle, Transformation origin)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
source()
The path to the file to be transformed.Path
target()
The path to the transformed file.byte[]
transform()
Transform the file.
-
-
-
Constructor Detail
-
Logging
public Logging(String process, String participle, Transformation origin)
Constructor.- Parameters:
process
- Process name (gerund form)participle
- Past participle of the processorigin
- Original transformation to wrap with logging
-
-
Method Detail
-
source
public Path source()
Description copied from interface:Transformation
The path to the file to be transformed.- Specified by:
source
in interfaceTransformation
- Returns:
- Path to the source file
-
target
public Path target()
Description copied from interface:Transformation
The path to the transformed file.- Specified by:
target
in interfaceTransformation
- Returns:
- Path to the target file after transformation
-
transform
public byte[] transform()
Description copied from interface:Transformation
Transform the file.- Specified by:
transform
in interfaceTransformation
- Returns:
- Transformed file content as byte array
-
-