Feature Requests: Browse | Submit New | Admin

[#22650] Allow an optional log file for Win32::Daemon

Date:
2008-11-01 04:16
Priority:
3
Submitted By:
Daniel Berger (djberg96)
Assigned To:
Daniel Berger (djberg96)
Category:
win32-service
State:
Deleted
Summary:
Allow an optional log file for Win32::Daemon

Detailed description
Instead of automatically redirecting STDOUT and STDERR to NUL, allow the user to pass a file name as an argument to
Daemon.new. If present, STDOUT and STDERR will then be redirected to that handle in append mode. It would be up to the
user to properly close the handle in the service_stop method.

Dan (me)

Add A Comment: Notepad

Please login


Followup

Message
Date: 2014-02-21 20:09
Sender: Daniel Berger

Transferred this issue to github:

https://github.com/djberg96/win32-service/issues/14
Date: 2009-06-30 16:32
Sender: Daniel Berger

Come to think of it, we probably shouldn't be closing stdin if
it's an interactive service.

Dan (me)
Date: 2009-06-30 16:03
Sender: Daniel Berger

Actually, maybe it would be easier to allow arguments to the
mainloop method, with options for each handle like so:

MyDaemon.mainloop(
   :stderr => "C:/errors.log",
   :stdout => "C:/output.log"
   :stdin  => nil
)

I think we could automatically close the handles in the service_stop
method, too. Just look for the appropriate instance variables
and see if they're set.

Dan (me)

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
close_date2014-02-21 20:092014-02-21 20:09djberg96
resolution_idNone2014-02-21 20:09djberg96
status_idOpen2014-02-21 20:09djberg96