# Change log directory from default "log"?

**URL:** <https://www.ruby-forum.com/t/change-log-directory-from-default-log/136320>\
**Category:** Rails\
**Created:** [April 30, 2008, 8:15pm UTC](https://www.ruby-forum.com/t/change-log-directory-from-default-log/136320 "2008-04-30T20:15:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nwiger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dbc845/32.png) [@nwiger](https://www.ruby-forum.com/u/nwiger)\
**Post date:** [April 30, 2008, 8:15pm UTC](https://www.ruby-forum.com/t/change-log-directory-from-default-log/136320/1 "2008-04-30T20:15:52Z")

</div>

Hi, I know there’s a way to do this but can’t find it.

IT wants the log directory changed from its default of “log/” to “/var/  
log/rails”. Where can I do this?

Thanks,  
Nate

---

<div class="post-metadata">

**Author:** ![nwiger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dbc845/32.png) [@nwiger](https://www.ruby-forum.com/u/nwiger)\
**Post date:** [April 30, 2008, 8:42pm UTC](https://www.ruby-forum.com/t/change-log-directory-from-default-log/136320/2 "2008-04-30T20:42:30Z")

</div>

I think that you can change this in your environment files, e.g.,  
config/environments/production.rb, using config.log\_path. See the  
#initialize\_logger method in initialize.rb.

But, I wonder whether this is a good idea if you run multiple rails apps  
on  
that machine. If you point more than one of them at /var/log/rails for  
logging, all of their logs will run together. Maybe you intend to make  
app-specific dirs under /var/log/rails?

Regards,  
Craig
