Website hosting service by Active-Venture.com
  

 Back to Index

6.28.5 LogRecord Objects

LogRecord instances are created every time something is logged. They contain all the information pertinent to the event being logged. The main information passed in is in msg and args, which are combined using msg % args to create the message field of the record. The record also includes information such as when the record was created, the source line where the logging call was made, and any exception information to be logged.

LogRecord has no methods; it's just a repository for information about the logging event. The only reason it's a class rather than a dictionary is to facilitate extension.

 

 
class LogRecord( name, lvl, pathname, lineno, msg, args, exc_info)
Returns an instance of LogRecord initialized with interesting information. The name is the logger name; lvl is the numeric level; pathname is the absolute pathname of the source file in which the logging call was made; lineno is the line number in that file where the logging call is found; msg is the user-supplied message (a format string); args is the tuple which, together with msg, makes up the user message; and exc_info is the exception tuple obtained by calling sys.exc_info() (or None, if no exception information is available).

 

 

  

 

2002-2004 Active-Venture.com Webhosting Service

 

Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://python.org/doc/

 

Domain registration : Buy domain name or register domain name from $5.95/year only

 

Cheap domain registration : Register domain name or buy domain name, including free domain hosting services

 
  Active-Domain.com offers cheap domain registration, domain name transfer and domain search services