Capistrano logging

by john on May 15, 2008

The logging in Capistrano could be so much better. Just for example, when a task is initiated, that log item should really pop out. At present, the log line starts with “executing” for both the indication that a task has been started, and for running a remote command. Because the same word is used, it is hard to see at a glance where you are in a long task. So at present it is:

   * executing task reload_apache
   * executing "sudo /etc/init.d/apache2 reload"

This is lame. Task initiation is important, and should be called out in the first word. Similarly, when a command is run sudo, the fact of “sudo” probably has priority over “executing.” So for my eyes, at least, something like this would be far more communicative:

*** Task: reload_apache
  * sudo: "/etc/init.d/apache2 reload"

And output and errors might be flagged with two stars.

I bet the changing the logging for the task, at least, would be a quick monkeypatch.

Previous post:

Next post: