Class Logger
- java.lang.Object
-
- de.unistuttgart.informatik.fius.icge.log.Logger
-
public abstract class Logger extends Object
Helper class that interceptsSystem.outandSystem.errand allows to attach multiple streams to capture the outputs of intercepted streams.- Version:
- 2.0
- Author:
- Tim Neumann, Tobias Wältken, Fabian Bühler
-
-
Field Summary
Fields Modifier and Type Field Description static PrintStreamerrorThe error logger printing toSystem.errstatic PrintStreamoutThe main logger printing toSystem.out
-
Constructor Summary
Constructors Constructor Description Logger()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanaddErrorOutputStream(OutputStream stream)Function to add aOutputStreamto the error loggerstatic booleanaddOutOutputStream(OutputStream stream)Function to add aOutputStreamto the out loggerstatic voidclearErrorOutputStream()Clears the error OutputStreamsstatic voidclearOutOutputStream()Clears the out OutputStreamsstatic booleanremoveErrorOutputStream(OutputStream stream)Function to remove aOutputStreamfrom the error loggerstatic booleanremoveOutOutputStream(OutputStream stream)Function to remove aOutputStreamfrom the out logger
-
-
-
Field Detail
-
out
public static PrintStream out
The main logger printing toSystem.out
-
error
public static PrintStream error
The error logger printing toSystem.err
-
-
Method Detail
-
addOutOutputStream
public static boolean addOutOutputStream(OutputStream stream)
Function to add aOutputStreamto the out logger- Parameters:
stream- TheOutputStreamto add- Returns:
- Returns true if successfull
- See Also:
OutputStreamMultiplier.addOutputStream(OutputStream)
-
removeOutOutputStream
public static boolean removeOutOutputStream(OutputStream stream)
Function to remove aOutputStreamfrom the out logger- Parameters:
stream- TheOutputStreamto remove- Returns:
- Returns true if successfull
- See Also:
OutputStreamMultiplier.removeOutputStream(OutputStream)
-
clearOutOutputStream
public static void clearOutOutputStream()
Clears the out OutputStreams
-
addErrorOutputStream
public static boolean addErrorOutputStream(OutputStream stream)
Function to add aOutputStreamto the error logger- Parameters:
stream- TheOutputStreamto add- Returns:
- Returns true if successfull
- See Also:
OutputStreamMultiplier.addOutputStream(OutputStream)
-
removeErrorOutputStream
public static boolean removeErrorOutputStream(OutputStream stream)
Function to remove aOutputStreamfrom the error logger- Parameters:
stream- TheOutputStreamto remove- Returns:
- Returns true if successfull
- See Also:
OutputStreamMultiplier.removeOutputStream(OutputStream)
-
clearErrorOutputStream
public static void clearErrorOutputStream()
Clears the error OutputStreams
-
-