Class DisabledStepLogger
java.lang.Object
io.getlime.security.powerauth.lib.cmd.logging.DisabledStepLogger
- All Implemented Interfaces:
StepLogger
Disabled step logger for silent logging
- Author:
- Lukas Lukovsky, lukas.lukovsky@wultra.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StepLoggerSingleton instance of a disabled step logger -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the logger output, writes code to close the array and opened objectvoidstart()Start the object streaming, outputs start of the result object:voidWrite information about incorrectly finished execution.voidwriteDoneOK(String id) Write information about successfully finished execution.voidwriteError(String id, Exception exception) Write error with given exception information.voidwriteError(String id, String errorMessage) Write error with given error message.voidwriteError(String id, String name, String errorMessage) Write error with given error name and error message, that is used as a description.voidwriteError(String id, String name, String errorMessage, Exception exception) Write error with given error name and error message, that is used as a description.voidWrites an object representing the step of the execution.voidwriteServerCall(String id, String uri, String method, Object requestObject, byte[] requestBytes, Map<String, ?> headers) Write the information about the server call.voidWrite error in case of a network issues.voidwriteServerCallError(String id, int statusCode, Object responseObject, Map<String, ?> headers) Write information about the failed server request.voidwriteServerCallOK(String id, Object responseObject, Map<String, ?> headers) Write information about the successful server request.
-
Field Details
-
INSTANCE
Singleton instance of a disabled step logger
-
-
Method Details
-
start
public void start()Description copied from interface:StepLoggerStart the object streaming, outputs start of the result object:- Specified by:
startin interfaceStepLogger
-
writeItem
Description copied from interface:StepLoggerWrites an object representing the step of the execution.- Specified by:
writeItemin interfaceStepLogger- Parameters:
id- Step ID.name- Step name.description- Step detailed description.status- Step status result.object- Custom object associated with the step.
-
writeServerCall
public void writeServerCall(String id, String uri, String method, Object requestObject, byte[] requestBytes, Map<String, ?> headers) Description copied from interface:StepLoggerWrite the information about the server call. Uses "writeItem" method under the hood.- Specified by:
writeServerCallin interfaceStepLogger- Parameters:
id- Step ID.uri- URI that will be called.method- HTTP method of the call.requestObject- Request object, in case of the POST, PUT, DELETE method.requestBytes- Request bytes, in case of the POST, PUT, DELETE method.headers- HTTP request headers.
-
writeServerCallOK
Description copied from interface:StepLoggerWrite information about the successful server request. Uses "writeItem" method under the hood.- Specified by:
writeServerCallOKin interfaceStepLogger- Parameters:
id- Step ID.responseObject- HTTP response object.headers- HTTP response headers.
-
writeServerCallError
public void writeServerCallError(String id, int statusCode, Object responseObject, Map<String, ?> headers) Description copied from interface:StepLoggerWrite information about the failed server request. Uses "writeItem" method under the hood.- Specified by:
writeServerCallErrorin interfaceStepLogger- Parameters:
id- Step ID.statusCode- HTTP response status code.responseObject- HTTP response object.headers- HTTP response headers.
-
close
public void close()Description copied from interface:StepLoggerCloses the logger output, writes code to close the array and opened object- Specified by:
closein interfaceStepLogger
-
writeServerCallConnectionError
Description copied from interface:StepLoggerWrite error in case of a network issues.- Specified by:
writeServerCallConnectionErrorin interfaceStepLogger- Parameters:
id- Step ID.e- Network exception.
-
writeError
Description copied from interface:StepLoggerWrite error with given error message. Error message is mapped as a step description.- Specified by:
writeErrorin interfaceStepLogger- Parameters:
id- Step ID.errorMessage- Error message.
-
writeError
Description copied from interface:StepLoggerWrite error with given exception information. Exception description is mapped as a step description, exception is passed as a custom object.- Specified by:
writeErrorin interfaceStepLogger- Parameters:
id- Step ID.exception- Exception that should be logged.
-
writeError
Description copied from interface:StepLoggerWrite error with given error name and error message, that is used as a description.- Specified by:
writeErrorin interfaceStepLogger- Parameters:
id- Step ID.name- Error name.errorMessage- Error message.
-
writeError
Description copied from interface:StepLoggerWrite error with given error name and error message, that is used as a description.- Specified by:
writeErrorin interfaceStepLogger- Parameters:
id- Step ID.name- Error name.errorMessage- Error message.exception- Exception that caused the error.
-
writeDoneOK
Description copied from interface:StepLoggerWrite information about successfully finished execution.- Specified by:
writeDoneOKin interfaceStepLogger- Parameters:
id- Step ID.
-
writeDoneFailed
Description copied from interface:StepLoggerWrite information about incorrectly finished execution.- Specified by:
writeDoneFailedin interfaceStepLogger- Parameters:
id- Step ID.
-