From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <eudev+bounces-43-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E7590139083
	for <garchives@archives.gentoo.org>; Mon,  4 Dec 2017 11:34:01 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2A5CCE0E97;
	Mon,  4 Dec 2017 11:34:01 +0000 (UTC)
Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E114FE0E97
	for <eudev@lists.gentoo.org>; Mon,  4 Dec 2017 11:34:00 +0000 (UTC)
Received: by mail-lf0-x244.google.com with SMTP id a12so18752947lfe.4
        for <eudev@lists.gentoo.org>; Mon, 04 Dec 2017 03:34:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id;
        bh=MuLItT/gmbv5/Ql6OAO6hTWYJJsyFfsTGXD57AfaWHE=;
        b=rcnxAO/vIdEXxrgu9atE8QVKP8H5b/wzW3nca92iKlLhnwljUnShnXz/3BPdnX0Vb1
         xEsiJ4EkzCoqat4NJznqEutKMJagHWt5arbzFO0WR7S4MNTdnM9ROBXW3G9wkGSUspSn
         G1js+JSknPc+TDwV3CnxEgXnK6KBYAXMKHJw7AtpxjbXlkERVE712k074W2wQ8u5f8Ia
         +j+nKJHdD9hyKiwIAiGDRFKN2c/GXm1rgWYDFx0Qm9QslbSjAH5HBWRTOcR0iB+nsHe4
         fDYFBEYi6H76bJwgwehc29QDzxxbCFHMFu7FmonXJkuKOTNYx5Q4qNwmeplv9Efl92PA
         sOGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id;
        bh=MuLItT/gmbv5/Ql6OAO6hTWYJJsyFfsTGXD57AfaWHE=;
        b=QRpiehKcmGydJZI6lqVOsRNv7och8B8rzsdJIjCuF0RvIbsvfAey9B6EgBckxcV7Jl
         NITZd2SXcXJnhyS3NqiPbZblXsYBafRkhPY5oMlRovIecKMQHmE+BKCysInkgqtX74s5
         dCkkaJVGjLTwPcV4f86oMGrVizYku/3UsuZ9Ydf2JtPEUWslbUx40b6TjE/SQ8ySauJ7
         zDFa2SqXoywXLekObf4LHLFmFLKs6rDwVrc28rrpNO2c0lssSwH9TqSpNON6UwXITHIn
         F031LqlLfurzsK7j5M9mnACgTCU/pTUom9nelyFmxxIWrevbA38QPPEhMzULdiGzX7oG
         Xf3Q==
X-Gm-Message-State: AJaThX7NuZs7j3DtBlu/O09Snnm+yUKpR4haqxekt/0WK/k6EGQGUUpd
	3GnSDLkyWgEKpnYONC65HAoos3Ln
X-Google-Smtp-Source: AGs4zMY3fTNWhb1bYW4GQ1wylntJqC+ONUnCQQdf0aqcs8FF2zyFNok+CASTM1W4wX4ZYCgiZ0XFtw==
X-Received: by 10.46.93.13 with SMTP id r13mr8848068ljb.102.1512387238986;
        Mon, 04 Dec 2017 03:33:58 -0800 (PST)
Received: from localhost.localdomain (c-5eea33a1-74736162.cust.telenor.se. [94.234.51.161])
        by smtp.gmail.com with ESMTPSA id n36sm2326882lfi.78.2017.12.04.03.33.57
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 04 Dec 2017 03:33:57 -0800 (PST)
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: eudev@lists.gentoo.org
Cc: marcus.folkesson@gmail.com
Subject: [eudev] [PATCH] udevd: spit out --debug to stderr
Date: Mon,  4 Dec 2017 12:33:49 +0100
Message-Id: <20171204113349.14757-1-marcus.folkesson@gmail.com>
X-Mailer: git-send-email 2.15.0
Precedence: bulk
List-Post: <mailto:eudev@lists.gentoo.org>
List-Help: <mailto:eudev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:eudev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:eudev+subscribe@lists.gentoo.org>
List-Id: eudev mailing list <eudev.gentoo.org>
X-BeenThere: eudev@gentoo.org
X-BeenThere: eudev@lists.gentoo.org
X-Archives-Salt: b25d6fe9-ecda-466d-b5ce-f4f8df691b2d
X-Archives-Hash: ae8a5d37b3e723fce698f6286574c5a3

When using --debug, we want the output to our console.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 src/udev/udevd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index aa34d84e5..cf826c6dc 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1152,8 +1152,10 @@ int main(int argc, char *argv[]) {
         if (r < 0)
                 log_warning_errno(r, "failed to parse kernel command line, ignoring: %m");
 
-        if (arg_debug)
+        if (arg_debug) {
+		log_set_target(LOG_TARGET_CONSOLE);
                 log_set_max_level(LOG_DEBUG);
+	}
 
         if (getuid() != 0) {
                 r = log_error_errno(EPERM, "root privileges required");
-- 
2.15.0