diff options
author | 2009-02-12 19:15:45 +0000 | |
---|---|---|
committer | 2009-02-12 19:15:45 +0000 | |
commit | fd52e10228bb147ac1a439bd02f0909c21f36439 (patch) | |
tree | a437b868880703dd592965c081d99cee9c3dbadc /paludis/environments | |
parent | 4a5c88b7a4b94d26665cd840df5467e401dddcbe (diff) | |
download | paludis-fd52e10228bb147ac1a439bd02f0909c21f36439.tar.gz paludis-fd52e10228bb147ac1a439bd02f0909c21f36439.tar.xz |
Messages output handler
Diffstat (limited to 'paludis/environments')
8 files changed, 42 insertions, 6 deletions
diff --git a/paludis/environments/paludis/default_output.conf b/paludis/environments/paludis/default_output.conf index 9c8cf0692..7c87df8f0 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 ed7a08050..5137a58fc 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 000000000..927124369 --- /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 000000000..67a2787d8 --- /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 338d31bf2..bf7a5ba15 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 5884ea383..b8c8a0f63 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 000000000..899812440 --- /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 000000000..a6981b012 --- /dev/null +++ b/paludis/environments/paludis/output_managers/show_messages.conf @@ -0,0 +1,5 @@ +# Show messages only. + +handler = messages_to_stdout +child = standard + |