Module: Lich::Common::Log::Preset

Defined in:
documented/common/log.rb

Overview

Provides preset formatting for log messages. This module contains methods to format log messages with specific presets.

Class Method Summary collapse

Class Method Details

.as(kind, body) ⇒ String

Formats a message with a preset.

Examples:

Formatting a message with a preset

formatted_message = Preset.as(:info, "This is an info message")

Parameters:

  • kind (Symbol)

    The kind of preset to use.

  • body (String)

    The body of the message to format.

Returns:

  • (String)

    The formatted message with preset tags.



168
169
170
# File 'documented/common/log.rb', line 168

def self.as(kind, body)
  %[<preset id="#{kind}">#{body}</preset>]
end