lib/yle_tf/system/tf_hook_output_logger.rb
def line_level(line)
        if (m = /^(?<level>[A-Z]+): (?<line>.*)$/.match(line))
          line_level = m[:level].downcase.to_sym
          return [line_level, m[:line]] if level?(line_level)
        end

        [level, line]
      end
# Extracts the log level from the line if found,
# otherwise returns the default level and the line as is
Extracts the log level from the line if found,
otherwise returns the default level and the line as is
Extracts the log level from the line if found otherwise returns the default level and the line as is
def line_level(line)
        if (m = /^(?<level>[A-Z]+): (?<line>.*)$/.match(line))
          line_level = m[:level].downcase.to_sym
          return [line_level, m[:line]] if level?(line_level)
        end
        [level, line]
      end
def line_level ( line ) if ( m = / ^(?<level>[A-Z]+): (?<line>.*)$ / . match ( line ) ) line_level = m [ :level ] . downcase . to_sym return [ line_level , m [ :line ] ] if level? ( line_level ) end [ level , line ] end
Extracts the log level from the line if found,
otherwise returns the default level and the line as is
Extracts the log level from the line if found otherwise returns the default level and the line as is
line