Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Setting the path for logging #110

Open
bararchy opened this issue May 30, 2016 · 1 comment
Open

Setting the path for logging #110

bararchy opened this issue May 30, 2016 · 1 comment

Comments

@bararchy
Copy link

How do I tell the Celluloid::Logger to log to a file and not STDOUT ?

@bogdanRada
Copy link

bogdanRada commented Jul 25, 2016

I think you need something like this:

require 'logger' 
require 'dcell'

Celluloid.logger = ::Logger.new(ENV['LOG_PATH'].nil? ? STDOUT : ENV['LOG_PATH'])
DCell.start :id => "itchy", :addr => "tcp://127.0.0.1:9001"

And then you can set ENV['LOG_path'] to the absolute path of a file, or you can just hardcode that value . I hope that helps :)

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

No branches or pull requests

2 participants