struct Crylog::Formatters::LineFormatter

Overview

Formats the message to fit on a single line.

Defined in:

formatters/line_formatter.cr

Constructors

Instance Method Summary

Instance methods inherited from struct Crylog::Formatters::LogFormatter

call(message : Message) : String call

Constructor methods inherited from struct Crylog::Formatters::LogFormatter

new new

Constructor Detail

def self.new(allow_line_breaks : Bool = false) #

Instantiates self, stripping out out line breaks unless allow_line_breaks.


[View source]

Instance Method Detail

def allow_line_breaks : Bool #

Whether line breaks within a message should be stripped out.


[View source]
def allow_line_breaks=(allow_line_breaks : Bool) #

Whether line breaks within a message should be stripped out.


[View source]
def call(message : Crylog::Message) : String #

Consumes a message and returns a formatted string representation of it.


[View source]