Logging And Environment


#1

Hi All,

Couple easy questions:

  1. How do I view what environment my app is running under (i.e
    production / testing / development) - I’m not sure what RAILS_ENV is
    set at, how to I take a look at it?

  2. Somehow (?) I have turned logging “off”. I’d like to have it back
    on :s I have files called production.log, test.log, server.log,
    development.log in /myapp/log/ but they are all 0 byte files. Doing a
    “tail -f production.log” just brings up nothing as nothing seems to be
    being added to it.

Help?

Thanks,

Nik


#2

Nik W. wrote:

Hi All,

Couple easy questions:

  1. How do I view what environment my app is running under (i.e
    production / testing / development) - I’m not sure what RAILS_ENV is
    set at, how to I take a look at it?

Nik,

Not sure about your logging problem, but the environment can be found
with:

ENV[“RAILS_ENV”]

Jeff C.man


#3

Ok cool so that fixed that… I now know I’m running in production…
so what happened to my logs?

On 4/8/06, Jeff C.man removed_email_address@domain.invalid wrote:

Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


[ munkywrench development ]
http://munkywrench.co.nz
removed_email_address@domain.invalid
(027) 424 5433


#4

I tried changing the permissions… both the /log/ dir and the files
inside it are 777… no dice

On 4/8/06, Nik W. removed_email_address@domain.invalid wrote:

production / testing / development) - I’m not sure what RAILS_ENV is

[ munkywrench development ]
http://munkywrench.co.nz
removed_email_address@domain.invalid
(027) 424 5433


[ munkywrench development ]
http://munkywrench.co.nz
removed_email_address@domain.invalid
(027) 424 5433