From patchwork Thu Sep 17 02:29:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ansis Atteka X-Patchwork-Id: 518675 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id BF3A914017E for ; Thu, 17 Sep 2015 12:29:43 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 9C1C5109E1; Wed, 16 Sep 2015 19:29:42 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 3C610109DD for ; Wed, 16 Sep 2015 19:29:41 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 30A8E4204B5 for ; Wed, 16 Sep 2015 20:29:40 -0600 (MDT) X-ASG-Debug-ID: 1442456979-09eadd48fa27c100001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id JQ8BUnUHSmfzpYTi (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Sep 2015 20:29:39 -0600 (MDT) X-Barracuda-Envelope-From: aatteka@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mail-pa0-f46.google.com) (209.85.220.46) by mx1-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 17 Sep 2015 02:29:39 -0000 Received-SPF: unknown (mx1-pf1.cudamail.com: Multiple SPF records returned) X-Barracuda-Apparent-Source-IP: 209.85.220.46 X-Barracuda-RBL-IP: 209.85.220.46 Received: by padhy16 with SMTP id hy16so5910732pad.1 for ; Wed, 16 Sep 2015 19:29:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=baJfgV/6Zu6xg6A/ee0FDfqowIMjUJJQ+Tk4aGEilWc=; b=jN/Wc12VwIj5wIKlF7WLE5ocZXOkKroXaYE++cnOYyBMUKFbI4WbqACOguuV/66R76 LgEGIcVjavkRvt9RWiiPsMEi22xPVU259Imxv9jUoxf/VzK0VEjDYVshba3YHMaHYBey 2Ib63YhMXN8iFr3KwRdA20u1t3uBbj2NiCfhkhasEQtYECtoo5cJaX/qrxPJG39FA2Wh wSwoUtKtfYlpkPdC5YRRRfhe4yOhMcpmr9UQk6J6YkTyBLR49R22/Gn1zj8zQPYZyOiy qa+qpv2w8xjJTbpMaaBVXKap2lJ9M0n/rLa+g8PhBrH02DgaQcZ3hTdzB8K2g6MDT2iM VTsA== X-Gm-Message-State: ALoCoQk0mMeTZ0qHbTYA2gfY3/UqJrvs3IZZ9b9qEoxMVrqg9l34wb+QHTuR1qLAulfcADj/8GaZ X-Received: by 10.67.23.232 with SMTP id id8mr68251349pad.138.1442456978231; Wed, 16 Sep 2015 19:29:38 -0700 (PDT) Received: from aatteka-MacBookPro.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id xg2sm680689pbb.77.2015.09.16.19.29.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Sep 2015 19:29:37 -0700 (PDT) X-CudaMail-Envelope-Sender: aatteka@nicira.com From: Ansis Atteka To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-915111144 X-CudaMail-DTE: 091615 X-CudaMail-Originating-IP: 209.85.220.46 Date: Wed, 16 Sep 2015 19:29:30 -0700 X-ASG-Orig-Subj: [##CM-E1-915111144##][PATCH] vlog: deprecate --syslog-target argument Message-Id: <1442456970-15309-1-git-send-email-aatteka@nicira.com> X-Mailer: git-send-email 2.1.4 X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1442456979 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH] vlog: deprecate --syslog-target argument X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Commit fe089c0d1e18 ("vlog: abstract out interface to syslog daemon") introduced --syslog-method flag that supersedes --syslog-target flag by: 1. making logging format configurable 2. letting daemon to also talk over UNIX domain socket (this is handy when local rsyslog daemon is running in different network namespace on the same host) Signed-off-by: Ansis Atteka Acked-by: Ben Pfaff --- NEWS | 1 + lib/vlog.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index ca22c8e..8bdaf3e 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ Post-v2.4.0 targets to run a new system testsuite. These tests can be run inside a Vagrant box. See INSTALL.md for details - Dropped support for GRE64 tunnel. + - Mark --syslog-target argument as deprecated. v2.4.0 - 20 Aug 2015 diff --git a/lib/vlog.c b/lib/vlog.c index 29ba620..da31e6f 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -706,6 +706,7 @@ vlog_init(void) if (ovsthread_once_start(&once)) { long long int now; int facility; + bool print_syslog_target_deprecation; /* Do initialization work that needs to be done before any logging * occurs. We want to keep this really minimal because any attempt to @@ -740,6 +741,15 @@ vlog_init(void) 0, INT_MAX, vlog_disable_rate_limit, NULL); unixctl_command_register("vlog/reopen", "", 0, 0, vlog_unixctl_reopen, NULL); + + ovs_rwlock_rdlock(&pattern_rwlock); + print_syslog_target_deprecation = syslog_fd >= 0; + ovs_rwlock_unlock(&pattern_rwlock); + + if (print_syslog_target_deprecation) { + VLOG_WARN("--syslog-target flag is deprecated, use " + "--syslog-method instead"); + } } }