From 43d6b17d879a3247a118af1cde69cdebb70fe0a8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 9 Mar 2010 13:31:20 +0000 Subject: [PATCH] * In the NixOS tests, send syslog messages to the serial port (so that they appear in the build log of the test). svn path=/nixos/trunk/; revision=20490 --- modules/services/logging/syslogd.nix | 10 ++++++++++ modules/testing/test-instrumentation.nix | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/services/logging/syslogd.nix b/modules/services/logging/syslogd.nix index 7c3e54cadb0..64b158742ec 100644 --- a/modules/services/logging/syslogd.nix +++ b/modules/services/logging/syslogd.nix @@ -19,6 +19,8 @@ let *.crit /var/log/warn *.*;mail.none;local1.none -/var/log/messages + + ${config.services.syslogd.extraConfig} ''; in @@ -37,6 +39,14 @@ in messages. ''; }; + + extraConfig = mkOption { + default = ""; + example = "news.* -/var/log/news"; + description = '' + Additional text appended to syslog.conf. + ''; + }; }; diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix index c404e044f63..5e62c698f27 100644 --- a/modules/testing/test-instrumentation.nix +++ b/modules/testing/test-instrumentation.nix @@ -74,7 +74,12 @@ in # `xwininfo' is used by the test driver to query open windows. environment.systemPackages = [ pkgs.xorg.xwininfo ]; - + + # Send all of /var/log/messages to the serial port (except for + # kernel messages through klogd, which already appear on the + # serial port). + services.syslogd.extraConfig = "*.*,kern.none /dev/ttyS0"; + }; }