On Sep 29, 2007, at 12:11 PM, [EMAIL PROTECTED] wrote:
I've looked through the cap code and find ways to search for tasks, to get things like fully_qualified_namespace (which in this case just reports "a" or "b" etc) Is there a way to get command to report "a:do_something" by inspecting something?
The "current_task" variable will always point to the TaskDefinition object for the currently executing task, so:
puts(current_task.fully_qualified_name)That should print the fully qualified name of the currently running task.
2. I need to handle situations where errors come up in the running of various tasks by showing that error to the user but also logging it to a file.
I'd encourage you to subclass Capistrano::Logger, in that case, so that it both logs to a file and writes to the terminal. Then, set the logger to an instance of your custom subclass.
- Jamis
smime.p7s
Description: S/MIME cryptographic signature
