lib/rest-ftp-daemon/logger.rb in rest-ftp-daemon-0.242.1 vs lib/rest-ftp-daemon/logger.rb in rest-ftp-daemon-0.242.2

- old
+ new

@@ -7,11 +7,11 @@ context = {} unless context.is_a? Hash context[:level] ||= Logger::DEBUG # Build prefixes depending on this context prefix1 = build_prefix(context) - prefix2 = build_prefix() + " | " + prefix2 = build_prefix + " | " lines = context[:lines] if lines.is_a? Hash output = build_from_hash prefix2, lines @@ -34,27 +34,27 @@ def build_prefix context = {} LOG_FORMAT_MESSAGE % [ context[:wid].to_s, context[:jid].to_s, context[:id].to_s, - context[:level].to_i+1 + context[:level].to_i + 1, ] end protected - def build_from_array prefix, lines - lines.map do |value| - #text = value.to_s.strip[0..LOG_TRIM_LINE] - text = value.to_s[0..LOG_TRIM_LINE] - "#{prefix}#{text}" - end + def build_from_array prefix, lines + lines.map do |value| + #text = value.to_s.strip[0..LOG_TRIM_LINE] + text = value.to_s[0..LOG_TRIM_LINE] + "#{prefix}#{text}" end + end - def build_from_hash prefix, lines - lines.map do |name, value| - text = value.to_s.strip[0..LOG_TRIM_LINE] - "#{prefix}#{name}: #{text}" - end + def build_from_hash prefix, lines + lines.map do |name, value| + text = value.to_s.strip[0..LOG_TRIM_LINE] + "#{prefix}#{name}: #{text}" end + end end