
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
-
Sam Smoot May 20th, 2008 @ 08:37 PM
- Milestone cleared.
Not a 0.9.0 blocker, but the sooner the better of course.
-
Dan Kubb (dkubb) May 25th, 2008 @ 09:43 PM
Paul, I agree with the behavior you outline. Would you mind submitting a patch with this behavior?
-
Sam Smoot June 2nd, 2008 @ 04:58 PM
- Milestone cleared.
-
Sam Smoot June 9th, 2008 @ 05:57 PM
- State changed from new to resolved
This is resolved in HEAD.
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »