Log

toLog()

Method that returns a json object with the basic structure of the log:

interface Log {
  id: string;
  level: string;
  group?: string;
  message: string;
  data?: unknown;
  time: number;
  timeStamp: string;
  lambda?: LogLambda;
}

Option

Type

Description

id

string

Request ID in format UUID V4

level

string

Logger level. Example: info, trace, error, etc.

group (Optional)

string

Grouping logs

message

string

Log message

data (Optional)

object

Additional information that can be shared to the log

time

number

The datetime in long

timeStamp

string

The datetime in ISO String

lambda (Optional)

string

Information about lambda. Example: name, memory, arn, etc.

any

any additional parameters

Last updated

Was this helpful?