Internet Direct (Indy) Version 9.0.2 Beta
TIdSysLog.SendMessage
Sends a message to the loggin daemon.

procedure SendMessage(const AMsg: TIdSysLogMessage; const AAutoTimeStamp: Boolean); overload;
procedure SendMessage(const AMsg: String; const AFacility: TidSyslogFacility; const ASeverity: TIdSyslogSeverity); overload;
procedure SendMessage(const AProcess: String; const AText: String; const AFacility: TidSyslogFacility; const ASeverity: TIdSyslogSeverity; const AUsePID: Boolean; const APID: Integer); overload;
Parameters
const AProcess: String
The process name.

const AText: String
Descriptive text for the syslog entry.

const AFacility: TidSyslogFacility
The facility for the logged message.

const ASeverity: TIdSyslogSeverity
The severity of the logged message.

const AUsePID: Boolean = False
Use a process ID.

const APID: Integer = -1
Process ID for the syslog entry.

Description
SendMessage is an overloaded procedure in TIdSysLog used to form and transmit a message destined for the logging daemon.

One variant of SendMessage sends the existing TIdSyslogMessage instance identified in AMsg to the logging daemon. AAutoTimeStamp indicates if the current date and time should be applied to the TIdSyslogMessage.Timestamp property prior to transmission. This variant calls Send using the encode value for the message.

Other variants of SendMessage construct a new TIdSyslogMessage instance and populate it's values using the arguments specified for the procedure. Each of these overloaded procedure calls the SendMessage variant that uses the existing TIdSyslogMessage instance.