LogMessage

Data object used to store captured log messages.

Description

The LogMessage class allows you to create data objects used to store captured log messages.

Important points

Constructors

NewLogMessage(level LevelType, source string, correlationId string, errors.ErrorDescription , message string) LogMessage

  • level: LevelType - log level.
  • source: string - source.
  • correlationId: string - transaction id used to trace execution through the call chain.
  • err: errors.ErrorDescription - error object associated with this message.
  • message: string - human-readable message to log.

Fields

Time

Time the message was generated

Time: time.Time

Level

Log level

Level: LevelType

Source

Source (context name)

Source: string

CorrelationId

Transaction id used to trace execution through a call chain.

CorrelationId: string

Error

Transaction id used to trace execution through a call chain.

See also ErrorDescription, ApplicationError

Error: ErrorDescription

Message

Human-readable message

Message: string