From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id CD3245A026E; Mon, 10 Oct 2022 10:35:48 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH v3 4/7] log, conf: Add support for logging to file Date: Mon, 10 Oct 2022 10:35:45 +0200 Message-Id: <20221010083548.831309-5-sbrivio@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221010083548.831309-1-sbrivio@redhat.com> References: <20221010083548.831309-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Message-ID-Hash: OYY2Q7YVWH4P3Z6XNFFLZS4BS5WN763E X-Message-ID-Hash: OYY2Q7YVWH4P3Z6XNFFLZS4BS5WN763E X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: <> Archived-At: List-Archive: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: SW4gc29tZSBlbnZpcm9ubWVudHMsIHN1Y2ggYXMgS3ViZVZpcnQgcG9kcywgd2UgbWlnaHQgbm90 IGhhdmUgYQ0Kc3lzdGVtIGxvZ2dlciBhdmFpbGFibGUuIFdlIGNvdWxkIGNob29zZSB0byBydW4g aW4gZm9yZWdyb3VuZCwgYnV0DQp0aGlzIHRha2VzIGF3YXkgdGhlIGNvbnZlbmllbnQgc3luY2hy b25pc2F0aW9uIG1lY2hhbmlzbSBkZXJpdmVkIGZyb20NCmZvcmtpbmcgdG8gYmFja2dyb3VuZCB3 aGVuIGludGVyZmFjZXMgYXJlIHJlYWR5Lg0KDQpBZGQgb3B0aW9uYWwgbG9nZ2luZyB0byBmaWxl IHdpdGggLWwvLS1sb2ctZmlsZ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