From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Goldish Subject: Log message format in KVM-Autotest Date: Mon, 8 Jun 2009 06:35:45 -0400 (EDT) Message-ID: <195912611.1415471244457345204.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> References: <299034493.1415451244457314604.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: KVM List , Autotest mailing list To: Lucas Meneghel Rodrigues Return-path: Received: from mx1.redhat.com ([66.187.233.31]:39494 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753670AbZFHKfr (ORCPT ); Mon, 8 Jun 2009 06:35:47 -0400 In-Reply-To: <299034493.1415451244457314604.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi Lucas, Before the merge with Autotest we used kvm_log.py to log formatted messages. Each message contained the current test's 'shortname' (e.g. Fedora.8.32.install), the current date and time (down to a 1 sec resolution) and the message itself. In addition, debug messages contained the name of the calling function, e.g. remote_login: Trying to login... What is the preferred way of obtaining this functionality using the new logging system inside Autotest? Should we define our own logging Handler for the KVM test in kvm.py, along with our own Formatter, or should we use logging.config.fileConfig(), or is there another preferred way? I'm particularly interested in printing the name of the caller in debug messages. This feature makes debugging easier and improves overall readability of the logs. (Obviously we can manually hardcode the name of the current function into every debug message, but that doesn't seem like a good solution.) Thanks, Michael