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, context IContext, errors.ErrorDescription , message string) LogMessage

  • level: LevelType - log level.
  • source: string - source.
  • context: IContext - a context to trace execution through a 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

TraceId

Transaction id used to trace execution through a call chain.

TraceId: string

Error

Transaction id used to trace execution through a call chain.

See also ErrorDescription, ApplicationError

Error: ErrorDescription

Message

Human-readable message

Message: string