Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes
logging.StringTemplateStyle Class Reference
Inheritance diagram for logging.StringTemplateStyle:
Inheritance graph
[legend]
Collaboration diagram for logging.StringTemplateStyle:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def usesTime
def format

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Static Public Attributes

string default_format = '${message}'
string asctime_format = '${asctime}'
string asctime_search = '${asctime}'

Private Attributes

 _fmt
 _tpl

Detailed Description

Definition at line 383 of file __init__.py.


Constructor & Destructor Documentation

def logging.StringTemplateStyle.__init__ (   self,
  fmt 
)

Reimplemented from logging.PercentStyle.

Definition at line 388 of file __init__.py.

00388 
00389     def __init__(self, fmt):
00390         self._fmt = fmt or self.default_format
00391         self._tpl = Template(self._fmt)

Here is the caller graph for this function:


Member Function Documentation

def logging.StringTemplateStyle.format (   self,
  record 
)

Reimplemented from logging.PercentStyle.

Definition at line 396 of file __init__.py.

00396 
00397     def format(self, record):
00398         return self._tpl.substitute(**record.__dict__)

Here is the caller graph for this function:

Reimplemented from logging.PercentStyle.

Definition at line 392 of file __init__.py.

00392 
00393     def usesTime(self):
00394         fmt = self._fmt
00395         return fmt.find('$asctime') >= 0 or fmt.find(self.asctime_format) >= 0

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from logging.PercentStyle.

Definition at line 389 of file __init__.py.

Definition at line 390 of file __init__.py.

Reimplemented from logging.PercentStyle.

Definition at line 385 of file __init__.py.

Reimplemented from logging.PercentStyle.

Definition at line 386 of file __init__.py.

Reimplemented from logging.PercentStyle.

Definition at line 384 of file __init__.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


The documentation for this class was generated from the following file: