public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Goldish <mgoldish@redhat.com>
To: Lucas Meneghel Rodrigues <lmr@redhat.com>
Cc: KVM List <kvm@vger.kernel.org>,
	Autotest mailing list <autotest@test.kernel.org>
Subject: Log message format in KVM-Autotest
Date: Mon, 8 Jun 2009 06:35:45 -0400 (EDT)	[thread overview]
Message-ID: <195912611.1415471244457345204.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> (raw)
In-Reply-To: <299034493.1415451244457314604.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>

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

       reply	other threads:[~2009-06-08 10:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <299034493.1415451244457314604.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-08 10:35 ` Michael Goldish [this message]
2009-06-08 13:03   ` Log message format in KVM-Autotest Lucas Meneghel Rodrigues
2009-06-08 18:15     ` [Autotest] " Martin Bligh
2009-06-08 19:17       ` Lucas Meneghel Rodrigues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=195912611.1415471244457345204.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com \
    --to=mgoldish@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox