Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11285 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

[PATCH] Automatically create the log directory if it does not exist

Reported by: lotswholetime Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveSupport Version: edge
Severity: normal Keywords: log, logger, verified
Cc:

Description

After checking out a Rails app with certain SCM systems that don't support versioning empty directories (eg. git), and starting up script/serve or script/console, Rails will complain that it could not create the log file. This patch updates the BufferedLogger class to create directories necessary to create the log file.

Attachments

auto_create_log_directory.diff (1.8 kB) - added by lotswholetime on 03/05/08 01:59:47.

Change History

03/05/08 01:59:47 changed by lotswholetime

  • attachment auto_create_log_directory.diff added.

03/05/08 02:06:36 changed by zdennis

+1 . I love the idea of avoiding this annoyance.

03/05/08 02:22:08 changed by jdgephart

+1-ing. this would avoid a lot of headaches.

03/05/08 13:11:58 changed by cdemyanovich

+1 Great idea, simple patch!

03/05/08 14:07:40 changed by lotswholetime

  • keywords changed from log, logger to log, logger, verified.

03/07/08 20:38:34 changed by demisone

+1 from me too :)

03/13/08 01:54:37 changed by david

  • status changed from new to closed.
  • resolution set to fixed.

(In [9013]) Fixed that BufferedLogger should create its own directory if one doesnt already exist (closes #11285) [lotswholetime]