Use rails logger in a class without active record

How do I use the regular rails logger in a rails app in a class that is does not inherit from active record?

Do you want to log from a controller? If so, something like this in application.rb is handy:

def log(message)   logger.info "Any_prefix_you_want_to_grep: #{message.to_s}" end

If you want to log from somewhere that's not inheriting any part of the rails stack, I'll let someone else answer...

Quoting Me <chabgood@gmail.com>:

How do I use the regular rails logger in a rails app in a class that is does not inherit from active record?

RAILS_DEFAULT_LOGGER.debug "Debug message"

HTH,   Jeffrey