can you describe more about where to put ColorKeyValue class ? I would be very appreicated
I'm trying to make YourOwnFormatter.new work but failed.
I created a file called color_key_value.rb and put those code inside
...
require 'colorized_string'
class ColorKeyValue < Lograge::Formatters::KeyValue
...
and
config.lograge.formatter = ColorKeyValue.new in development.rb
but it shows uninitialized constant ColorKeyValue (NameError)
thank you ! but I think got the error at this line : color = FIELDS_COLORS[key] || :default
Could not log "process_action.action_controller" event. NoMethodError: undefined method `default' for "user_type=NONE":ColorizedString ["/Users/alvin/Documents/flw/config/initializers/lograge.rb:24
can you describe more about where to put ColorKeyValue class ? I would be very appreicated
I'm trying to make YourOwnFormatter.new work but failed.
I created a file called color_key_value.rb and put those code inside
...
require 'colorized_string'
class ColorKeyValue < Lograge::Formatters::KeyValue
...
and
config.lograge.formatter = ColorKeyValue.new in development.rb
but it shows uninitialized constant ColorKeyValue (NameError)
You should put everything in a lograge initializer.
thank you ! but I think got the error at this line : color = FIELDS_COLORS[key] || :default
Could not log "process_action.action_controller" event. NoMethodError: undefined method `default' for "user_type=NONE":ColorizedString ["/Users/alvin/Documents/flw/config/initializers/lograge.rb:24
Can you share the whole file? You can use stuff gist.github.com/ or pastebin.com/