views:

171

answers:

3

Anyone now why I can't see logs for workling in workling.output or production.log?

In development the logs show up in the development.log.

In my environments/production.rb I have the log levl set to debug. config.log_level = :debug

I'm starting Starling and Workling like this

server > /usr/bin/starling -d -P /tmp/pids/starling.pid -L /mnt/app/current/log/starling.log -p 15151

local > cap deploy:restart

server > RAILS_ENV=production /mnt/app/current/script/workling_client start
A: 

If everything else is working ok, my guess would be that it's a permissions issue where the scripts don't have sufficient rights to write out the production log.

Mike Buckbee
A: 

The log level is different. The Default level for development mode is logger.debug, this shows basically everything. In production I think it's logger.info, this is the actions called, time taken and errors only.

railsninja
A: 

Actually the problem comes from the buffering that is being done by the system. The logs are not flushed right away to production.log.

You need to flush the logger to get your logs appear right away in production.log:

logger.info "Something informative here" logger.flush

I hope it helps.

mathieul