aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-19 21:55:00 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-19 21:55:00 +0000
commitc1c9e3143cd57d225a266d245775490bbebbf4b8 (patch)
treedf5051120df054b7f6caaeac86540ce36d48b29b
parent0da55a32d0dc88fdfadbf2eb9ebd68750a0684ae (diff)
downloadpaludis-c1c9e3143cd57d225a266d245775490bbebbf4b8.tar.gz
paludis-c1c9e3143cd57d225a266d245775490bbebbf4b8.tar.xz
Show elog messages at the end in summaries
-rw-r--r--paludis/environments/paludis/default_output.conf48
1 files changed, 41 insertions, 7 deletions
diff --git a/paludis/environments/paludis/default_output.conf b/paludis/environments/paludis/default_output.conf
index 330058c..a5862fa 100644
--- a/paludis/environments/paludis/default_output.conf
+++ b/paludis/environments/paludis/default_output.conf
@@ -1,8 +1,9 @@
# vim: set tw=80 ft=conf et sw=4 sts=4 :
# This is the default output configuration. In general, we show output to stdout
-# where possible, we keep logs of messages, and we keep logs of output only if a
-# failure occurs.
+# where possible, we keep logs of messages, we keep logs of output only if a
+# failure occurs, and we show elog messages at the end if we're running in an
+# environment that shows summaries.
#
# We use a few user-settable variables:
#
@@ -140,6 +141,33 @@ keep_on_success = true
summary_output_manager = format_messages_standard
summary_output_message = Messages log: ${filename}
+# Our messages also get displayed at the end, but only for log messages, and
+# only if our environment supports summaries:
+[manager format_important_log_messages_at_end]
+handler = conditional_alias
+condition_variable = summaries_supported
+if_true = format_important_log_messages_at_end_supported
+if_false = null
+if_unset = null
+
+# format_important_log_messages_at_end has decided we support summaries, so show
+# log messages at the end:
+[manager format_important_log_messages_at_end_supported]
+handler = format_messages
+format_debug =
+format_info = "%{green}***%{normal} %{message}%{newline}"
+format_warn =
+format_error =
+format_log = "%{blue}***%{normal} %{message}%{newline}"
+child = important_log_messages_at_end
+
+# At the end, we forward stored important log messages to standard output:
+[manager important_log_messages_at_end]
+handler = forward_at_finish
+if_success = true
+if_failure = false
+child = standard
+
# Our handler for 'exclusive' forwards to either 'exclusive_default', or, if
# 'quiet' is set to 'true', 'exclusive_quiet'.
[manager exclusive]
@@ -154,13 +182,13 @@ if_unset = exclusive_default
[manager exclusive_default]
handler = tee
children = standard log_output
-messages_children = format_log_messages_always
+messages_children = format_log_messages_always format_important_log_messages_at_end
# Alternatively, only send messages to standard rather than full output:
[manager exclusive_quiet]
handler = tee
children = log_output
-messages_children = format_log_messages_always format_messages_standard
+messages_children = format_log_messages_always format_messages_standard format_important_log_messages_at_end
# Our handler for 'interleaved' forwards to either 'interleaved_default' or, if
# 'quiet' is set to 'true', 'interleaved_quiet':
@@ -177,13 +205,13 @@ if_unset = interleaved_default
[manager interleaved_default]
handler = tee
children = standard_interleaved log_output
-messages_children = format_log_messages_always
+messages_children = format_log_messages_always format_important_log_messages_at_end
# Alternatively, only send messages to standard rather than full output:
[manager interleaved_quiet]
handler = tee
children = log_output
-messages_children = format_log_messages_always format_messages_interleaved
+messages_children = format_log_messages_always format_messages_interleaved format_important_log_messages_at_end
# When we're running in the background, keep an output log which, at user
# option, is deleted upon success, always keep a messages log, and send messages
@@ -191,5 +219,11 @@ messages_children = format_log_messages_always format_messages_interleaved
[manager background]
handler = tee
children = log_output
-messages_children = format_log_messages_always format_messages_interleaved
+messages_children = format_log_messages_always format_messages_interleaved format_important_log_messages_at_end
+
+# We need a way to discard messages
+[manager null]
+handler = tee
+children =
+messages_children =