TSparkleLoggingMiddleware Class
Intercepts and logs all incoming requests.
Syntax
Unit: Sparkle.Comp.LoggingMiddleware
TSparkleLoggingMiddleware = class(TSparkleMiddleware);
Properties
| Name | Description |
|---|---|
| FormatString | Specifies the format string for the message to be logged for each request/response, according to the format string options. The default format string is ":method :url :statuscode - :responsetime ms" |
| ExceptionFormatString | Specifies the format string for the message to be logged when an exception happens during the request processing. |
| LogExceptions | Indicates if the middleware should catch unhandled exceptions raised by the server and log them. |
| LogLevel | The level of log messages generated by the middleware. It could be Trace, Debug, Info, Warning, Error. Default value is Trace. |
| ExceptionLogLevel | The level of exception log messages generated by the middleware. It could be Trace, Debug, Info, Warning, Error. Default value is Error. |
| ErrorResponseOptions | Specifies the response sent to the client when LogExceptions is true an exception is intercepted. |
Events
| Name | Description |
|---|---|
| OnFilterLog | OnFilterLog event is fired for every incoming request that should be logged. |
| OnFilterLogEx | OnFilterExLog event is fired for every incoming request that should be logged. |