From patchwork Tue Nov 29 17:38:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Drobyshev X-Patchwork-Id: 13058903 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C8F1C4332F for ; Tue, 29 Nov 2022 17:38:50 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p04YE-0004Df-9U; Tue, 29 Nov 2022 12:37:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p04YD-0004DF-Cl for qemu-devel@nongnu.org; Tue, 29 Nov 2022 12:37:45 -0500 Received: from relay.virtuozzo.com ([130.117.225.111]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p04YA-0007aj-Lc for qemu-devel@nongnu.org; Tue, 29 Nov 2022 12:37:44 -0500 Received: from [192.168.16.240] (helo=roughy.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.95) (envelope-from ) id 1p04Xs-001KbY-Mg; Tue, 29 Nov 2022 18:37:24 +0100 To: qemu-devel@nongnu.org Cc: andrey.drobyshev@virtuozzo.com, den@virtuozzo.com, yur@openvz.org, marcandre.lureau@gmail.com, mike.maslenkin@gmail.com Subject: [PATCH v2 0/2] qga: improve "syslog" domain logging Date: Tue, 29 Nov 2022 19:38:07 +0200 Message-Id: <20221129173809.544174-1-andrey.drobyshev@virtuozzo.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=130.117.225.111; envelope-from=andrey.drobyshev@virtuozzo.com; helo=relay.virtuozzo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Andrey Drobyshev X-Patchwork-Original-From: Andrey Drobyshev via From: Andrey Drobyshev Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org These patches extend QGA logging interface, primarily under Windows guests. They enable QGA to write to Windows event log, much like syslog() on *nix. In addition we get rid of hardcoded log level used by ga_log(). v2: * Close event_log handle when doing cleanup_agent() * Fix switch cases indentation as reported by scripts/checkpatch.pl Andrey Drobyshev (2): qga-win: add logging to Windows event log qga: map GLib log levels to system levels configure | 3 +++ qga/installer/qemu-ga.wxs | 5 ++++ qga/main.c | 50 +++++++++++++++++++++++++++++++++++---- qga/meson.build | 19 ++++++++++++++- qga/messages-win32.mc | 9 +++++++ 5 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 qga/messages-win32.mc Reviewed-by: Konstantin Kostiuk Tested-by: Konstantin Kostiuk