Class DebugInOut
java.lang.Object
com.iohao.net.framework.core.flow.internal.DebugInOut
- All Implemented Interfaces:
ActionMethodInOut
Debug plugin that logs detailed request/response information for each action method invocation.
Prints a structured diagnostic message including the action command, parameters, return value, execution time, user ID, and error details (if any). An optional time threshold can be set to only log invocations that exceed a given duration in milliseconds.
PluginInOut - DebugInOut.
- Author:
- 渔民小镇
- date:
- 2021-12-12
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a DebugInOut with no time threshold (logs every invocation).DebugInOut(long time) Create a DebugInOut that only logs invocations exceeding the given time threshold. -
Method Summary
Modifier and TypeMethodDescriptionvoidfuckIn(FlowContext flowContext) Record the start time before action method execution.voidfuckOut(FlowContext flowContext) Log the debug information after action method execution.voidsetPrintConsumer(BiConsumer<String, FlowContext> printConsumer)
-
Constructor Details
-
DebugInOut
public DebugInOut()Create a DebugInOut with no time threshold (logs every invocation). -
DebugInOut
public DebugInOut(long time) Create a DebugInOut that only logs invocations exceeding the given time threshold.- Parameters:
time- minimum elapsed time in milliseconds to trigger logging
-
-
Method Details
-
fuckIn
Record the start time before action method execution.- Specified by:
fuckInin interfaceActionMethodInOut- Parameters:
flowContext- the current request flow context
-
fuckOut
Log the debug information after action method execution.Skips logging if the elapsed time is below the configured threshold. Delegates to either
printErrororprintNormalbased on whether the flow context contains an error.- Specified by:
fuckOutin interfaceActionMethodInOut- Parameters:
flowContext- the current request flow context
-
setPrintConsumer
-