Capistrano logging by jgn on Thursday, May 15, 2008 in Technology and Rails

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:

[source language='xml'] * executing task reload_apache * executing "sudo /etc/init.d/apache2 reload" [/source]

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:

[source language='xml'] *** Task: reload_apache * sudo: "/etc/init.d/apache2 reload" [/source]

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.

comments powered by Disqus