I'm not sure what value having cap provide a pidfile would do, since
cap isn't a daemon or server or otherwise meant to run in the
background. But I'd certainly be amenable to a patch to extend the
logging functionality, as you described.
- Jamis
On Jun 20, 2008, at 12:44 PM, goodieboy wrote:
>
> Jamis,
>
> I'm wondering if you'd consider adding pid file generation to the
> "cap" command? Something as simple as wrapping the
> Capistrano::CLI.execute call in a begin/rescue/ensure statement:
>
> pid_file='./task.pid'
> begin
> File.open(pid_file, File::RDWR|File::CREAT){|f| f.puts $$}
> Capistrano::CLI.execute
> rescue
> puts $!
> ensure
> File.delete(pid_file)
> end
>
> Maybe add it as an option to the "cap" command:
>
> cap deploy -pid
>
> Also, how about more logging options? Something I'd love to have is a
> log directory where the logs get stored in a ./log/<date>.<pid> file.
> That could be an option too? Maybe a task for deleting them all or by
> limit:
>
> cap deploy -log
>
> cap log:clear
>
> And it'd be really cool if the file handle had sync=true so other apps
> could poll the log file while the cap logger was writing! :)
>
> I'd gladly provide the code and tests if you'd like. Thanks for all of
> your efforts and awesome support!
>
> Matt
> >
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---