Package rrlog :: Package server :: Module textwriter :: Class TextlineLogWriter
[hide private]
[frames] | no frames]

Class TextlineLogWriter

source code

object --+
         |
        TextlineLogWriter
Known Subclasses:

Abstract base class for text line writers

Instance Methods [hide private]
 
__init__(self, format_line=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
estimateLineCount(self)
For performance reasons, it is allowed to estimate instead count exactly.
source code
str
cfn_cln(self, job)
Convenient string for callers file name / callers line number
source code
str
_format_line(self, job)
Default formatting method.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, format_line=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • format_line - Callable, takes a job and returns a single message line as str. See MsgJob for job attributes available. See textwriter.default_format_line for an example implementation.
Overrides: object.__init__

estimateLineCount(self)

source code 

For performance reasons, it is allowed to estimate instead count exactly. (Intended for implementations which need to read access written data to count; but not required here, we are simply counting exactly.)

Returns:
count of already written log lines

cfn_cln(self, job)

source code 

Convenient string for callers file name / callers line number

Returns: str
"*<cfn>(<cln>)", "" if not given

_format_line(self, job)

source code 

Default formatting method.

Returns: str
single log line