aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-22 09:45:37 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-22 09:46:24 +0100
commitbde9fd51b19f1702be7c08138e35d2db4a255e11 (patch)
treeb2f03bbbeff856c7aa08b3f6425021c94eac1315
parente629957ad758dea47095d1393ed11a1c0235e841 (diff)
downloadpaludis-bde9fd51b19f1702be7c08138e35d2db4a255e11.tar.gz
paludis-bde9fd51b19f1702be7c08138e35d2db4a255e11.tar.xz
Allow user defined extra managers
-rw-r--r--doc/configuration/output.html.part.in14
-rw-r--r--paludis/environments/paludis/default_output.conf28
2 files changed, 26 insertions, 16 deletions
diff --git a/doc/configuration/output.html.part.in b/doc/configuration/output.html.part.in
index 6767e85..e4548cc 100644
--- a/doc/configuration/output.html.part.in
+++ b/doc/configuration/output.html.part.in
@@ -26,23 +26,25 @@ quiet = false
<p>For more advanced usage, two additional variables allow additional output managers to be specified:
<pre>
-# extra_output_loggers may be used to define additional output managers that
+# extra_output_managers may be used to define additional output managers that
# handle normal output.
-extra_output_loggers =
+extra_output_managers =
-# extra_message_loggers may be used to define additional output managers that
+# extra_message_managers may be used to define additional output managers that
# handle messages.
-extra_message_loggers =
+extra_message_managers =
</pre>
<p>For example, if you wish to send messages to syslog, you could use:</p>
<pre>
-extra_message_loggers = my_syslog_messages
+extra_message_managers = my_syslog_messages
[manager my_syslog_messages]
handler = command
+start_command = echo Starting %{action} %{full_name} | logger -t paludis
+end_command = echo Finished %{action} %{full_name} | logger -t paludis
stdout_command = logger -t paludis
-stderr_command = logger -t paludis
+stderr_command = cat &gt;/dev/null
</pre>
diff --git a/paludis/environments/paludis/default_output.conf b/paludis/environments/paludis/default_output.conf
index 4d6012c..53ec206 100644
--- a/paludis/environments/paludis/default_output.conf
+++ b/paludis/environments/paludis/default_output.conf
@@ -13,11 +13,11 @@
# quiet may be set to 'true' to show only messages, rather than all output,
# when carrying out an action.
#
-# extra_output_loggers may be used to define additional output managers that
-# handle normal output.
+# extra_output_managers may be used to define additional output managers that
+# process normal output.
#
-# extra_message_loggers may be used to define additional output managers that
-# handle messages.
+# extra_message_managers may be used to define additional output managers that
+# process messages.
# First, we define some basic rules. If we're running exclusively, use the
# 'exclusive' manager:
@@ -82,15 +82,19 @@ if_failure = true
handler = buffer
child = standard
-# The 'log_output' manager forwards to 'log_output_keep_failures', unless the
+[manager log_output]
+handler = tee
+children = log_output_builtin ${extra_output_managers}
+
+# The 'log_output_builtin' manager forwards to 'log_output_keep_failures', unless the
# user has set 'always_keep_output_logs' to 'true', in which case it goes to
# 'log_output_keep_always'.
-[manager log_output]
+[manager log_output_builtin]
handler = conditional_alias
condition_variable = always_keep_output_logs
-if_true = log_output_keep_always ${extra_output_loggers}
-if_false = log_output_keep_failures ${extra_output_loggers}
-if_unset = log_output_keep_failures ${extra_output_loggers}
+if_true = log_output_keep_always
+if_false = log_output_keep_failures
+if_unset = log_output_keep_failures
# Our output log goes to a file, which gets discarded if we succeed or if it's
# empty. The summary_output options are used to display a message showing the
@@ -143,7 +147,11 @@ format_info = I %{message}%{newline}
format_warn = W %{message}%{newline}
format_error = E %{message}%{newline}
format_log = L %{message}%{newline}
-child = log_messages_always ${extra_message_loggers}
+child = log_messages_always_and_extras
+
+[manager log_messages_always_and_extras]
+handler = tee
+children = log_messages_always ${extra_message_managers}
# Our messages log goes to a file, which gets discarded only if it is empty:
[manager log_messages_always]