Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant convince logstasher to write to file instead of console #146

Open
shayneoAtNorwood opened this issue Feb 20, 2018 · 0 comments
Open

Comments

@shayneoAtNorwood
Copy link

shayneoAtNorwood commented Feb 20, 2018

I'm not sure what I'm doing wrong here, but I cant seem to convince logstasher to write its entries to a file instead of the console.

I have this in development.rb

# Enable the logstasher logs for the current environment
  config.logstasher.enabled = true
  # Each of the following lines are optional. If you want to selectively disable log subscribers.
  config.logstasher.controller_enabled = true
  config.logstasher.mailer_enabled = false
  config.logstasher.record_enabled = true
  config.logstasher.view_enabled = true
  config.logstasher.job_enabled = true
  # This line is optional if you do not want to suppress app logs in your <environment>.log
  config.logstasher.suppress_app_log = false
  # This line is optional, it allows you to set a custom value for the @source field of the log event
  config.logstasher.source = 'dev.local'
  # This line is optional if you do not want to log the backtrace of exceptions
  config.logstasher.backtrace = true
  # This line is optional, defaults to log/logstasher_<environment>.log
  config.logstasher.logger_path = 'log/logstasher.log'

I've also tried this

  # addthis info your development.rb or other environment file
  config.to_prepare do
    LogStasher.logger = Logger.new("#{Rails.root}/log/logstasher.log")
  end

To no effect....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant