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

Type MsgPart

object --+
         |
        MsgPart


Represents the MSG part of a syslog packet.

The MSG part of the packet consists of the TAG and CONTENT. The TAG and the CONTENT fields must be separated by a non-alphanumeric character. Unless you ensure that the CONTENT field begins with such a character a seperator of a colon and space will be inserted between them when the MsgPart object is converted into a UDP packet.

See Section 4.1.3 of RFC 3164 for details.
Method Summary
  __init__(self, tag, content, pid)
Initialise the object, specifying tag and content.
  __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
  content: The main component of the log message.
  tag: The name of the program that generated the log message.

Class Variable Summary
int MAX_TAG_LEN = 32                                                                    

Method Details

__init__(self, tag=None, content='', pid=None)
(Constructor)

Initialise the object, specifying tag and content.

See the documentation for the MsgPart.tag and MsgPart.content properties for further documentation.

If the pid is set it will be prepended to the content in square brackets when the packet is created.
Overrides:
__builtin__.object.__init__

Property Details

content

The main component of the log message.

The content field is a freeform field that often begins with the process ID (pid) of the program that created the message.

tag

The name of the program that generated the log message.

The tag can only contain alphanumeric characters. If the tag is longer than 32 characters it will be truncated automatically.

Class Variable Details

MAX_TAG_LEN

Type:
int
Value:
32                                                                    

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