aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/environments')
-rw-r--r--paludis/environments/paludis/default_output.conf8
-rw-r--r--paludis/environments/paludis/output_managers/Makefile.am8
-rw-r--r--paludis/environments/paludis/output_managers/keep_messages.conf5
-rw-r--r--paludis/environments/paludis/output_managers/keep_stdout_as_messages.conf7
-rw-r--r--paludis/environments/paludis/output_managers/logged.conf5
-rw-r--r--paludis/environments/paludis/output_managers/logged_only.conf4
-rw-r--r--paludis/environments/paludis/output_managers/quiet.conf6
-rw-r--r--paludis/environments/paludis/output_managers/show_messages.conf5
8 files changed, 42 insertions, 6 deletions
diff --git a/paludis/environments/paludis/default_output.conf b/paludis/environments/paludis/default_output.conf
index 9c8cf06..7c87df8 100644
--- a/paludis/environments/paludis/default_output.conf
+++ b/paludis/environments/paludis/default_output.conf
@@ -1 +1,9 @@
+# By default, output to stdout, keep logs of messages and keep output logs on
+# failure:
+
type = * : logged
+
+# But if we're being run in the background, display only messages to stdout, and
+# keep logs of messages and keep output logs on failure:
+
+type = * output_exclusivity = background : quiet
diff --git a/paludis/environments/paludis/output_managers/Makefile.am b/paludis/environments/paludis/output_managers/Makefile.am
index ed7a080..5137a58 100644
--- a/paludis/environments/paludis/output_managers/Makefile.am
+++ b/paludis/environments/paludis/output_managers/Makefile.am
@@ -12,9 +12,13 @@ DEFS= \
shareenvpaludisdir = $(sharedir)/paludis/environments/paludis/output_managers
dist_shareenvpaludis_DATA = \
- standard.conf \
+ keep_messages.conf \
+ keep_stdout_as_messages.conf \
logged.conf \
- logged_only.conf
+ logged_only.conf \
+ quiet.conf \
+ show_messages.conf \
+ standard.conf
logdir = /var/log/paludis
diff --git a/paludis/environments/paludis/output_managers/keep_messages.conf b/paludis/environments/paludis/output_managers/keep_messages.conf
new file mode 100644
index 0000000..9271243
--- /dev/null
+++ b/paludis/environments/paludis/output_managers/keep_messages.conf
@@ -0,0 +1,5 @@
+# Keep message logs
+
+handler = messages_to_stdout
+child = keep_stdout_as_messages
+
diff --git a/paludis/environments/paludis/output_managers/keep_stdout_as_messages.conf b/paludis/environments/paludis/output_managers/keep_stdout_as_messages.conf
new file mode 100644
index 0000000..67a2787
--- /dev/null
+++ b/paludis/environments/paludis/output_managers/keep_stdout_as_messages.conf
@@ -0,0 +1,7 @@
+# Keep message logs. For use by keep_messages; do not use directly.
+
+handler = file
+stdout = /var/log/paludis/%{time}-%{action}-%{id}.messages
+stderr = ${stdout}
+keep_on_success = true
+
diff --git a/paludis/environments/paludis/output_managers/logged.conf b/paludis/environments/paludis/output_managers/logged.conf
index 338d31b..bf7a5ba 100644
--- a/paludis/environments/paludis/output_managers/logged.conf
+++ b/paludis/environments/paludis/output_managers/logged.conf
@@ -1,5 +1,6 @@
-# Sends output to both standard and logged_only.
+# Output to stdout / stderr, keep logs of messages and keep output logs on
+# failure.
handler = tee
-children = standard logged_only
+children = standard logged_only keep_messages
diff --git a/paludis/environments/paludis/output_managers/logged_only.conf b/paludis/environments/paludis/output_managers/logged_only.conf
index 5884ea3..b8c8a0f 100644
--- a/paludis/environments/paludis/output_managers/logged_only.conf
+++ b/paludis/environments/paludis/output_managers/logged_only.conf
@@ -1,5 +1,5 @@
-# This output handler keeps logs in /var/log/paludis/, but removes them on
-# success.
+# Keep logs of output only, and discard on success. Used by logged and quiet,
+# but may be directly useful.
handler = file
stdout = /var/log/paludis/%{time}-%{action}-%{id}.out
diff --git a/paludis/environments/paludis/output_managers/quiet.conf b/paludis/environments/paludis/output_managers/quiet.conf
new file mode 100644
index 0000000..8998124
--- /dev/null
+++ b/paludis/environments/paludis/output_managers/quiet.conf
@@ -0,0 +1,6 @@
+# Messages only to stdout / stderr, keep logs of messages and keep output logs
+# on failure.
+
+handler = tee
+children = logged_only show_messages keep_messages
+
diff --git a/paludis/environments/paludis/output_managers/show_messages.conf b/paludis/environments/paludis/output_managers/show_messages.conf
new file mode 100644
index 0000000..a6981b0
--- /dev/null
+++ b/paludis/environments/paludis/output_managers/show_messages.conf
@@ -0,0 +1,5 @@
+# Show messages only.
+
+handler = messages_to_stdout
+child = standard
+