summaryrefslogtreecommitdiff
path: root/src/pm-action.in
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-03-20 19:15:51 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-03-20 19:15:51 -0500
commit61e2d92c43953537855e89b744844b0af7b84700 (patch)
treecb08a43901e47c1395f27365d0cbf055a05d7c82 /src/pm-action.in
parentf5419be4798d653a76e18e598236b140450ea127 (diff)
Prettify logging a bit more.
Now with added timestamps, so you can see how long running all the hooks takes.
Diffstat (limited to 'src/pm-action.in')
-rw-r--r--src/pm-action.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pm-action.in b/src/pm-action.in
index b11ef22..61bf4f3 100644
--- a/src/pm-action.in
+++ b/src/pm-action.in
@@ -75,11 +75,14 @@ load_hook_parameters
rm -f "${INHIBIT}"
# run the sleep hooks
+log "$(date): Running hooks for $ACTION."
run_hooks sleep "$ACTION"
-
+log -n "$(date): $METHOD now."
# Sleep only if we know how and if a hook did not inhibit us.
command_exists "do_$METHOD" && [ ! -e "$INHIBIT" ] && { sync; "do_$METHOD"; }
+log "$(date): Running hooks for $REVERSE"
# run the sleep hooks in reverse with the wakeup action
run_hooks sleep "$REVERSE" reverse
+log "$(date): Finished."