struct Crylog::Formatters::LineFormatter
- Crylog::Formatters::LineFormatter
- Crylog::Formatters::LogFormatter
- Struct
- Value
- Object
Overview
Formats the message to fit on a single line.
Defined in:
formatters/line_formatter.crConstructors
-
.new(allow_line_breaks : Bool = false)
Instantiates
self
, stripping out out line breaks unless allow_line_breaks.
Instance Method Summary
-
#allow_line_breaks : Bool
Whether line breaks within a message should be stripped out.
-
#allow_line_breaks=(allow_line_breaks : Bool)
Whether line breaks within a message should be stripped out.
-
#call(message : Crylog::Message) : String
Consumes a message and returns a formatted string representation of it.
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.
Instance Method Detail
def allow_line_breaks=(allow_line_breaks : Bool)
#
Whether line breaks within a message should be stripped out.
def call(message : Crylog::Message) : String
#
Consumes a message and returns a formatted string representation of it.