DefaultServerLog

case class DefaultServerLog[F[_]](doLogWhenReceived: String => F[Unit], doLogWhenHandled: (String, Option[Throwable]) => F[Unit], doLogAllDecodeFailures: (String, Option[Throwable]) => F[Unit], doLogExceptions: (String, Throwable) => F[Unit], noLog: F[Unit], logWhenReceived: Boolean, logWhenHandled: Boolean, logAllDecodeFailures: Boolean, logLogicExceptions: Boolean, showEndpoint: AnyEndpoint => String, showRequest: ServerRequest => String, showResponse: ServerResponse[_] => String, includeTiming: Boolean, clock: Clock) extends ServerLog[F]
trait Serializable
trait Product
trait Equals
trait ServerLog[F]
class Object
trait Matchable
class Any

Type members

Types

override type TOKEN = Long

The type of the per-request token that is generated when a request is started and passed to callbacks when the request is completed. E.g. Unit or a timestamp (Long).

The type of the per-request token that is generated when a request is started and passed to callbacks when the request is completed. E.g. Unit or a timestamp (Long).

Value members

Concrete methods

def clock(c: Clock): DefaultServerLog[F]
override def decodeFailureHandled(ctx: DecodeFailureContext, response: ServerResponse[_], token: Long): F[Unit]

Invoked when there's a decode failure for an input of the endpoint and the interpreter, or other interceptors, provided a response.

Invoked when there's a decode failure for an input of the endpoint and the interpreter, or other interceptors, provided a response.

Definition Classes
override def decodeFailureNotHandled(ctx: DecodeFailureContext, token: Long): F[Unit]

Invoked when there's a decode failure for an input of the endpoint and the interpreter, or other interceptors, haven't provided a response.

Invoked when there's a decode failure for an input of the endpoint and the interpreter, or other interceptors, haven't provided a response.

Definition Classes
def doLogAllDecodeFailures(f: (String, Option[Throwable]) => F[Unit]): DefaultServerLog[F]
def doLogExceptions(f: (String, Throwable) => F[Unit]): DefaultServerLog[F]
def doLogWhenHandled(f: (String, Option[Throwable]) => F[Unit]): DefaultServerLog[F]
def doLogWhenReceived(f: String => F[Unit]): DefaultServerLog[F]
override def exception(ctx: ExceptionContext[_, _], ex: Throwable, token: Long): F[Unit]

Invoked when an exception has been thrown when running the server logic or handling decode failures.

Invoked when an exception has been thrown when running the server logic or handling decode failures.

Definition Classes
def includeTiming(doInclude: Boolean): DefaultServerLog[F]
def logAllDecodeFailures(doLog: Boolean): DefaultServerLog[F]
def logLogicExceptions(doLog: Boolean): DefaultServerLog[F]
def logWhenHandled(doLog: Boolean): DefaultServerLog[F]
def noLog(f: F[Unit]): DefaultServerLog[F]
override def requestHandled(ctx: DecodeSuccessContext[F, _, _, _], response: ServerResponse[_], token: Long): F[Unit]

Invoked when all inputs of the request have been decoded successfully and the endpoint handles the request by providing a response, with the given status code.

Invoked when all inputs of the request have been decoded successfully and the endpoint handles the request by providing a response, with the given status code.

Definition Classes
override def requestReceived(request: ServerRequest): F[Unit]

Invoked when the request has been received.

Invoked when the request has been received.

Definition Classes
override def requestToken: Long

Invoked when the request has been received to obtain the per-request token, such as the starting timestamp.

Invoked when the request has been received to obtain the per-request token, such as the starting timestamp.

Definition Classes
override def securityFailureHandled(ctx: SecurityFailureContext[F, _], response: ServerResponse[_], token: Long): F[Unit]

Invoked when the security logic fails and returns an error.

Invoked when the security logic fails and returns an error.

Definition Classes
def showEndpoint(s: AnyEndpoint => String): DefaultServerLog[F]
def showRequest(s: ServerRequest => String): DefaultServerLog[F]

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product