#294 ✓resolved
Paul Dlug

Bug: DM always creates log/dm.log

Reported by Paul Dlug | May 19th, 2008 @ 02:52 PM

Including DataMapper always creates log/dm.log as part of the logger initialization. This is rather dangerous behavior since it is unknown if the filesystem is actually writable at this point. It also prevents the user from initializing the log to their own location.

This appears to be due to the initialization of the logger to Logger.new(nil, :fatal) and the subsequent call to 'initialize_log(log)' in logger.rb which has the line:

log ||= "log/dm.log"

Thereby always setting the log to 'log/dm.log'. I believe a reasonable default would be to log fatal to STDOUT or to detect the case of "logger not initialized" as different than "logger initialized to nil log".

Happy to submit a patch if there is some consensus on what the correct behavior should be.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket