def <<(msg)
      buffer.add_message Message.new(
        msg,
        time: Time.now.utc.freeze,
        progname: @progname,
        severity: UNKNOWN
      )
      msg
    end
def <<(msg)
      buffer.add_message Message.new(
        msg,
        time: Time.now.utc.freeze,
        progname: @progname,
        severity: UNKNOWN
      )
      msg
    end
Create a new Logger instance.

 We mostly follow the common interface of Ruby's core Logger class with the
 exception that you can give one or more flows to write logs to. Each
 {Flow} is responsible to write a log event (e.g. to a file, STDOUT, a TCP
 socket, ...). Each log event is written to all defined {#flows}.

 When giving the flows here, you can given them in one of varous
 representations, all of which we will transform into an actual {Flow}:

 * A {Rackstash::Flow} object. For the most control over the flow, you can
   create the {Flow} object on your own and pass it here
 * A {Rackstash::Adapter::Adapter}. When passing an adapter, we will
   create a new {Flow} from this adapter, using its default encoder and
   without any defined filters.
 * An log device from which we can create an adapter. In this case, we
   first attempt to build an adapter from it using {Rackstash::Adapter.[]}.
   After that, we use it to create a {Flow} as above.

 When passing a block to this initializer, we will yield the last created
 flow object to it. If you pass multiple log devices / adapters / flows,
 only the last one will be yielded. If the block doesn't expect an argument,
 we run the block in the instance scope of the flow.

 The following three example to create a custom Logger are thus equivalent:

     logger = Rackstash::Logger.new(STDOUT) do
       encoder Rackstash::Encoder::Message.new
     end

     logger = Rackstash::Logger.new(Rackstash::Adapter::IO.new(STDOUT)) do
       encoder Rackstash::Encoder::Message.new
     end

     adapter = Rackstash::Adapter::IO.new(STDOUT)
     flow = Rackstash::Flows.new(adapter) do
       encoder Rackstash::Encoder::Message.new
     end
     logger = Rackstash::Logger.new(flow)

 To create a simple Logger which logs to `STDOUT` using the default JSON
 format, you can just use

     logger = Rackstash::Logger.new(STDOUT)

 @param flows [Array<Flow, Object>, Flow, Adapter::Adapter, Object]
   an array of {Flow}s or a single {Flow}, respectivly object which can be
   used as a {Flow}'s adapter. See {Flow#initialize}.
 @param level [Integer] a numeric log level. Normally you'd use one of the
   {SEVERITIES} constants, i.e., an integer between 0 and 5. We will only
   log messages with a severity above the configured level.
 @param progname [String] the logger's progname, used as the default for
   log messages if none is passed to {#add} and passed to the {#formatter}.
   By default we use {PROGNAME}.
 @param formatter [#call] the log formatter for each individual buffered
   line. See {#formatter} for details.
 @yieldparam flow [Rackstash::Flow] if the given block accepts an argument,
   we yield the last {Flow} as a parameter. Without an expected argument,
   the block is directly executed in the context of the last {Flow}.
 Add a message to the current {Buffer} without any further formatting. If
 the current buffer is bufering, the message will just be added. Else,
 it will be flushed to the configured {#flows} directly.

 @param msg [Object]
 @return [String] the passed `msg`