Method: Scriptster::Logger.set_format

Defined in:
lib/scriptster/logger.rb

.set_format(format) ⇒ Object

Specify the format of each line in the logs.

The template can reference the following keys:

* timestamp
* name
* type
* message

Examples:

Logger::set_format "%{timestamp} %{name} %{type} %{message}"

Parameters:

  • format (String)

    The format template.



105
106
107
# File 'lib/scriptster/logger.rb', line 105

def self.set_format(format)
  @@format = format
end