Log lines like these get a green color class...

Loading drushrc "/var/aegir/platforms/myplatform/sites/s3.example.com/drushrc.php" into "site" scope.
Bootstrap to phase 0.

Adding 'info' and 'message' to the info class would help this. This should match _drush_print_log()

patch comming...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helmo’s picture

ergonlogic’s picture

Status: Needs review » Needs work

This has made the entire log grey for me.

ergonlogic’s picture

fyi, these are all the task types I see:

mysql> select distinct type from hosting_task_log;
+------------+
| type       |
+------------+
| backup     |
| bootstrap  |
| command    |
| debug      |
| error      |
| failed     |
| info       |
| memory     |
| message    |
| notice     |
| ok         |
| queue      |
| rollback   |
| status     |
| success    |
| successful |
| warning    |
+------------+
17 rows in set (0.00 sec)
ergonlogic’s picture

Oddly, all the rows are getting a class of 'hosting-info', but I don't see why...

ergonlogic’s picture

Status: Needs work » Needs review

Sorry, almost everything was set to 'hosting-info'. I think 'message' should remain a 'hosting-success', no?

ergonlogic’s picture

Revised patch for #5 attached.

If we go with what's in _drush_print_log(), then we should probably change all instances of drush_log(..., 'message') to drush_log(..., 'success'), or something.

ergonlogic’s picture

Status: Needs review » Fixed

Fixed in Provision with d5a8862, and Hosting with 72f7db1.

As per #5, I switched to using 'success' rather than 'message' in Provision. This change means that 'status-info' is the default, so, for example, memory rows are no longer green. However, this better highlights the operations that are actually successful, and reduces the noise.

I think we could still tweak these a bit. For example, I think 'rollback' messages could be flagged as hosting-warning, and maybe 'debug' too.

helmo’s picture

Status: Fixed » Needs work

I think you forgot to push to provision... I can't find d5a8862 there.

Drush also uses the cancel type... in 8.x-6.x ... so that's not really aegir specific anymore.
includes/drush.inc: drush_log($msg ? $msg : dt('Aborting.'), 'cancel');

helmo’s picture

The hosting-dispatch cron-job now started mailing:
Updated task status to "Successful" [success]

Changing it to 'info' seems better:

drush_log(dt('Updated task status to "!log"', array('!log' => $message)), 'info');
ergonlogic’s picture

Status: Needs work » Fixed

Oops, I'd missed a push from Provision. I also cleaned up the rest, as per your suggestions.

anarcat’s picture

Status: Fixed » Needs work

Great!

I think having rollbacks as warnings is a great idea, although they will probably always end up in red because a rollback usually happens after an error, which should be red. Debug should be inconspicuous.

anarcat’s picture

Status: Needs work » Fixed

oups, didn't mean to change status.

ergonlogic’s picture

ok, I made rollbacks orange, even though the overall task will remain red.

Fixed in 7e31ccc

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 72f7db1 on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by ergonlogic:
    Issue #2037045 by helmo, ergonlogic: Match Drush's log styling.
    

  • Commit 72f7db1 on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by ergonlogic:
    Issue #2037045 by helmo, ergonlogic: Match Drush's log styling.