Module netsyslog :: Class HeaderPart
[frames | no frames]

Type HeaderPart

object --+
         |
        HeaderPart


The HEADER part of the message.

The HEADER contains a timestamp and a hostname. It is the first component of the log message that is displayed in the output of syslog.

See Section 4.1.2 of RFC 3164 for details.
Method Summary
  __init__(self, timestamp, hostname)
Initialise the object, specifying timestamp and hostname.
  __str__(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Property Summary
  hostname: The hostname where the log message was created.
  timestamp: The local time when the message was written.

Method Details

__init__(self, timestamp=None, hostname=None)
(Constructor)

Initialise the object, specifying timestamp and hostname.

The timestamp represents the local time when the log message was created. If the timestamp is not set the current local time will be used. See the HeaderPart.timestamp property for a note on the format.

The hostname should be set to the hostname of the computer that originally generated the log message. If the hostname is not set the hostname of the local computer will be used. See the HeaderPart.hostname property for a note on the format.
Overrides:
__builtin__.object.__init__

Property Details

hostname

The hostname where the log message was created.

Should be the first part of the hostname, or an IP address. Should NOT be set to a fully qualified domain name.

timestamp

The local time when the message was written.

Must follow the format 'Mmm DD HH:MM:SS'. If the day of the month is less than 10, then it MUST be represented as a space and then the number.

Generated by Epydoc 2.1 on Fri Jul 15 11:57:30 2005 http://epydoc.sf.net