From nobody Mon May 6 11:43:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1641389526; cv=none; d=zohomail.com; s=zohoarc; b=MQw/tO0TtfqBefQfXrpKkFdhJRkogx5WsRJChVxlteb3ZFOdD2+yXe4VBScKqFZDLXckhsXHEGqleI73gKEgJudfrWgD3a7O9xVnI+MH/Wg8xh6gdr27zKfrQAIu79DLVh0w03ZWGBgcnJPioZs+nm85tkosz0qn79HZhOu0PYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641389526; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=uhXg5I4Ki7CZlbs7Eaf73qR4vR7eFrj00jv9j7fjP2I=; b=nR472+BGEAl1SAskZJyUZuZHx0g4F+tvOZQAFU9NeyJDJ6wU1e0pArQNB4XmjRPwIpRGlko1Oe2i7tF1kw3hDTtbN8evK9FXommzQ9V+9nFhcVW3kWDbX1VB6Rs9+4ymoTLqpxPQ+Gv44O2xD2B5ZWgB35HsY6N1l1dGZb1GHas= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 164138952696929.924431914065167; Wed, 5 Jan 2022 05:32:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-116-9K5meDsPPWSGFKpMwM8xxg-1; Wed, 05 Jan 2022 08:31:57 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BDB6881EE60; Wed, 5 Jan 2022 13:31:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 890DC7E663; Wed, 5 Jan 2022 13:31:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 94EA41809CB8; Wed, 5 Jan 2022 13:31:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 205DVkGh021347 for ; Wed, 5 Jan 2022 08:31:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id B839A202660C; Wed, 5 Jan 2022 13:31:46 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B3CA92026990 for ; Wed, 5 Jan 2022 13:31:43 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9E6AD8FDE2B for ; Wed, 5 Jan 2022 13:31:43 +0000 (UTC) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-516-MPBRYlYVN7WNEqOiaurgnw-1; Wed, 05 Jan 2022 08:31:42 -0500 Received: by mail-ed1-f70.google.com with SMTP id x19-20020a05640226d300b003f8b80f5729so26616329edd.13 for ; Wed, 05 Jan 2022 05:31:42 -0800 (PST) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id o12sm15979248edz.71.2022.01.05.05.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 05:31:40 -0800 (PST) Received: from wheatley.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 48E0E304495D; Wed, 5 Jan 2022 14:31:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641389525; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uhXg5I4Ki7CZlbs7Eaf73qR4vR7eFrj00jv9j7fjP2I=; b=CwHW529GgLybtRZastnva+8sMsClRkmNjIrX16sSLkg5wcrSJFYLcVp8yJGkbPxfINpRxb on9vdL+uf94yau5mtnoY8QieHW2ci1DJH/oHSyVM98xqBXa6xeJaSBpskRPAVXVrotEA8N N0YvkLqchHFcXJbqBacNkw8RNcFNI4Q= X-MC-Unique: 9K5meDsPPWSGFKpMwM8xxg-1 X-MC-Unique: MPBRYlYVN7WNEqOiaurgnw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uhXg5I4Ki7CZlbs7Eaf73qR4vR7eFrj00jv9j7fjP2I=; b=E45lQ1evIPEXGoochi0re0E/7LyYB8QYIjdZXny4RsFph2G8NwKXrbldehUXi0T6Sl 76TZvL6WK76GglQMT40zr11/Pq8gLpC2QEaienXOjLocwwuy8GIod9Wmux9ZAH72L4hy KflFinBNH5odb11S/Ou/TM/3+hQANyfUCjJhHQ3MBez/xqMsG7aRA0YxCPTVs2NUC8I0 PngZpruvhKnNbs5iUQEE39Rx2C2X8Yavj8vrH09siZLbOP6JxvBNG5P6IicLSdDiyvLu zRnPF+CU0kTILxIZmitucH5MvJVjgF67nWv5BA3sQxVXn5JRgn21JBt9djNWBQ4SjQeI IaAQ== X-Gm-Message-State: AOAM5312odeaDx0+UsoIm+PdS0pHmPkYBY157RhzT2K+VB5LpdLmyrh5 vVR5gI5t+A8EC8BVUGhDn2w89kXdMGNPcIFZH99+KzRL7briLvuO36VvXb9dMhyHnUh1tH55dLd 4qvDdec6jWsvzQ1gmQPI= X-Received: by 2002:aa7:c641:: with SMTP id z1mr53531169edr.84.1641389501336; Wed, 05 Jan 2022 05:31:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGUsfc+mkdT+CH8PZpRsQD6MSuoZzl/iNeBVsB+kcF1IoxP2q3Zdf9DWb/o74IOs7vYpJz8w== X-Received: by 2002:aa7:c641:: with SMTP id z1mr53531153edr.84.1641389501153; Wed, 05 Jan 2022 05:31:41 -0800 (PST) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH] util: Improve log out parsing errors Date: Wed, 5 Jan 2022 14:31:37 +0100 Message-Id: <0a56a8c27d2be2a693bee3f7159cb785e6dd8442.1641389497.git.mkletzan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Erik Skultety X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641389528974100001 Content-Type: text/plain; charset="utf-8" Suggested-by: Erik Skultety Signed-off-by: Martin Kletzander Reviewed-by: Michal Privoznik --- src/util/virlog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virlog.c b/src/util/virlog.c index 139dce8d0220..b44ad0ef6c47 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -1487,21 +1487,21 @@ virLogParseOutput(const char *src) if (!(tokens =3D g_strsplit(src, ":", 0)) || (count =3D g_strv_length(tokens)) < 2) { virReportError(VIR_ERR_INVALID_ARG, - _("Malformed format for output '%s'"), src); + _("Malformed format for log output '%s'"), src); return NULL; } =20 if (virStrToLong_uip(tokens[0], NULL, 10, &prio) < 0 || (prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR)) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid priority '%s' for output '%s'"), + _("Invalid log priority '%s' for log output '%s'"), tokens[0], src); return NULL; } =20 if ((dest =3D virLogDestinationTypeFromString(tokens[1])) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid destination '%s' for output '%s'"), + _("Invalid log destination '%s' for log output '%s'= "), tokens[1], src); return NULL; } @@ -1511,7 +1511,7 @@ virLogParseOutput(const char *src) ((dest =3D=3D VIR_LOG_TO_FILE || dest =3D=3D VIR_LOG_TO_SYSLOG) && count !=3D 3)) { virReportError(VIR_ERR_INVALID_ARG, - _("Output '%s' does not meet the format requirement= s " + _("Log output '%s' does not meet the format require= ments " "for destination type '%s'"), src, tokens[1]); return NULL; } --=20 2.34.1