Package CedarBackup3 :: Module util :: Class Diagnostics
[hide private]
[frames] | no frames]

Class Diagnostics

source code

object --+
         |
        Diagnostics

Class holding runtime diagnostic information.

Diagnostic information is information that is useful to get from users for debugging purposes. I'm consolidating it all here into one object.

Instance Methods [hide private]
 
__init__(self)
Constructor for the Diagnostics class.
source code
 
__repr__(self)
Official string representation for class instance.
source code
 
__str__(self)
Informal string representation for class instance.
source code
 
getValues(self)
Get a map containing all of the diagnostic values.
source code
 
printDiagnostics(self, fd=<epydoc.docintrospecter._DevNull object>, prefix='')
Pretty-print diagnostic information to a file descriptor.
source code
 
logDiagnostics(self, method, prefix='')
Pretty-print diagnostic information using a logger method.
source code
 
_buildDiagnosticLines(self, prefix='')
Build a set of pretty-printed diagnostic lines.
source code
 
_getVersion(self)
Property target to get the Cedar Backup version.
source code
 
_getInterpreter(self)
Property target to get the Python interpreter version.
source code
 
_getEncoding(self)
Property target to get the filesystem encoding.
source code
 
_getPlatform(self)
Property target to get the operating system platform.
source code
 
_getLocale(self)
Property target to get the default locale that is in effect.
source code
 
_getTimestamp(self)
Property target to get a current date/time stamp.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]
 
_getMaxLength(values)
Get the maximum length from among a list of strings.
source code
Properties [hide private]
  version
Cedar Backup version.
  interpreter
Python interpreter version.
  platform
Platform identifying information.
  encoding
Filesystem encoding that is in effect.
  locale
Locale that is in effect.
  timestamp
Current timestamp.

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructor for the Diagnostics class.

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Official string representation for class instance.

Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 

Informal string representation for class instance.

Overrides: object.__str__

getValues(self)

source code 

Get a map containing all of the diagnostic values.

Returns:
Map from diagnostic name to diagnostic value.

printDiagnostics(self, fd=<epydoc.docintrospecter._DevNull object>, prefix='')

source code 

Pretty-print diagnostic information to a file descriptor.

Parameters:
  • fd - File descriptor used to print information.
  • prefix - Prefix string (if any) to place onto printed lines

Note: The fd is used rather than print to facilitate unit testing.

logDiagnostics(self, method, prefix='')

source code 

Pretty-print diagnostic information using a logger method.

Parameters:
  • method - Logger method to use for logging (i.e. logger.info)
  • prefix - Prefix string (if any) to place onto printed lines

_buildDiagnosticLines(self, prefix='')

source code 

Build a set of pretty-printed diagnostic lines.

Parameters:
  • prefix - Prefix string (if any) to place onto printed lines
Returns:
List of strings, not terminated by newlines.

Property Details [hide private]

version

Cedar Backup version.

Get Method:
_getVersion(self) - Property target to get the Cedar Backup version.

interpreter

Python interpreter version.

Get Method:
_getInterpreter(self) - Property target to get the Python interpreter version.

platform

Platform identifying information.

Get Method:
_getPlatform(self) - Property target to get the operating system platform.

encoding

Filesystem encoding that is in effect.

Get Method:
_getEncoding(self) - Property target to get the filesystem encoding.

locale

Locale that is in effect.

Get Method:
_getLocale(self) - Property target to get the default locale that is in effect.

timestamp

Current timestamp.

Get Method:
_getTimestamp(self) - Property target to get a current date/time stamp.