Difference between revisions of "TSyslogClient"
From Ultibo.org
| Line 45: | Line 45: | ||
| <code>FRemotePort:Word;</code> | | <code>FRemotePort:Word;</code> | ||
| | | | ||
| + | |- | ||
| + | | <code>FBSDFormat:Boolean;</code> | ||
| + | | If True send messages in BSD format (RFC 3164), otherwise send messages in IETF format (RFC 5424) | ||
|- | |- | ||
| <code>FOctetCounting:Boolean;</code> | | <code>FOctetCounting:Boolean;</code> | ||
| Line 83: | Line 86: | ||
|- | |- | ||
| <code>procedure SetRemotePort(ARemotePort:Word);</code> | | <code>procedure SetRemotePort(ARemotePort:Word);</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>procedure SetBSDFormat(ABSDFormat:Boolean);</code> | ||
| | | | ||
|- | |- | ||
| Line 92: | Line 98: | ||
|- | |- | ||
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div> | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div> | ||
| + | |- | ||
| + | | <code>function GetValue(const AValue:String):String;</code> | ||
| + | | | ||
|- | |- | ||
| <code>function GetPriority(AFacility,ASeverity:LongWord):String;</code> | | <code>function GetPriority(AFacility,ASeverity:LongWord):String;</code> | ||
| Line 97: | Line 106: | ||
|- | |- | ||
| <code>function GetMessage(const APriority,AAddress,ATag,AContent:String):String;</code> | | <code>function GetMessage(const APriority,AAddress,ATag,AContent:String):String;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>function GetMessageExt(const APriority,AAddress,AAppname,AProcID,AMsgID,AData,AMsg:String):String;</code> | ||
| | | | ||
|- | |- | ||
| Line 111: | Line 123: | ||
|- | |- | ||
| <code>property RemotePort:Word read FRemotePort write SetRemotePort;</code> | | <code>property RemotePort:Word read FRemotePort write SetRemotePort;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>property BSDFormat:Boolean read FBSDFormat write SetBSDFormat;</code> | ||
| | | | ||
|- | |- | ||
| Line 122: | Line 137: | ||
|- | |- | ||
| <code>function SendMessage(AFacility,ASeverity:LongWord; const ATag,AContent:String):LongWord;</code> | | <code>function SendMessage(AFacility,ASeverity:LongWord; const ATag,AContent:String):LongWord;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>function SendMessageExt(AFacility,ASeverity:LongWord; const AAppname,AProcID,AMsgID,AData,AMsg:String):LongWord;</code> | ||
| | | | ||
|- | |- | ||
Revision as of 03:29, 5 November 2025
Return to Unit Services
Description
To be documented
Class definitions
TSyslogClient = class(TObject)
public
| |
constructor Create;
|
|
destructor Destroy; override;
|
|
private
| |
FLock:TMutexHandle;
|
|
FProtocol:LongWord;
|
|
FBoundPort:Word;
|
|
FRemoteHost:String;
|
|
FRemotePort:Word;
|
|
FBSDFormat:Boolean;
|
If True send messages in BSD format (RFC 3164), otherwise send messages in IETF format (RFC 5424) |
FOctetCounting:Boolean;
|
|
FBroadcastEnabled:Boolean;
|
|
FUDPClient:TWinsock2UDPClient;
|
|
FTCPClient:TWinsock2TCPClient;
|
|
function AcquireLock:Boolean;
|
|
function ReleaseLock:Boolean;
|
|
procedure SetProtocol(AProtocol:LongWord);
|
|
procedure SetBoundPort(ABoundPort:Word);
|
|
function GetRemoteHost:String;
|
|
procedure SetRemoteHost(const ARemoteHost:String);
|
|
procedure SetRemotePort(ARemotePort:Word);
|
|
procedure SetBSDFormat(ABSDFormat:Boolean);
|
|
procedure SetOctetCounting(AOctetCounting:Boolean);
|
|
procedure SetBroadcastEnabled(ABroadcastEnabled:Boolean);
|
|
protected
| |
function GetValue(const AValue:String):String;
|
|
function GetPriority(AFacility,ASeverity:LongWord):String;
|
|
function GetMessage(const APriority,AAddress,ATag,AContent:String):String;
|
|
function GetMessageExt(const APriority,AAddress,AAppname,AProcID,AMsgID,AData,AMsg:String):String;
|
|
public
| |
property Protocol:LongWord read FProtocol write SetProtocol;
|
|
property BoundPort:Word read FBoundPort write SetBoundPort;
|
|
property RemoteHost:String read GetRemoteHost write SetRemoteHost;
|
|
property RemotePort:Word read FRemotePort write SetRemotePort;
|
|
property BSDFormat:Boolean read FBSDFormat write SetBSDFormat;
|
|
property OctetCounting:Boolean read FOctetCounting write SetOctetCounting;
|
|
property BroadcastEnabled:Boolean read FBroadcastEnabled write SetBroadcastEnabled;
|
|
function SendMessage(AFacility,ASeverity:LongWord; const ATag,AContent:String):LongWord;
|
|
function SendMessageExt(AFacility,ASeverity:LongWord; const AAppname,AProcID,AMsgID,AData,AMsg:String):LongWord;
|
|
Function declarations
constructor TSyslogClient.Create;
Description: To be documented
| Note | None documented |
|---|
destructor TSyslogClient.Destroy;
Description: To be documented
| Note | None documented |
|---|
function TSyslogClient.AcquireLock:Boolean;
Description: To be documented
| Note | None documented |
|---|
function TSyslogClient.ReleaseLock:Boolean;
Description: To be documented
| Note | None documented |
|---|
procedure TSyslogClient.SetProtocol(AProtocol:LongWord);
Description: To be documented
| Note | None documented |
|---|
procedure TSyslogClient.SetBoundPort(ABoundPort:Word);
Description: To be documented
| Note | None documented |
|---|
function TSyslogClient.GetRemoteHost:String;
Description: To be documented
| Note | None documented |
|---|
procedure TSyslogClient.SetRemoteHost(const ARemoteHost:String);
Description: To be documented
| Note | None documented |
|---|
procedure TSyslogClient.SetRemotePort(ARemotePort:Word);
Description: To be documented
| Note | None documented |
|---|
procedure TSyslogClient.SetOctetCounting(AOctetCounting:Boolean);
Description: To be documented
| Note | None documented |
|---|
procedure TSyslogClient.SetBroadcastEnabled(ABroadcastEnabled:Boolean);
Description: To be documented
| Note | None documented |
|---|
function TSyslogClient.GetPriority(AFacility,ASeverity:LongWord):String;
Description: To be documented
| Note | None documented |
|---|
function TSyslogClient.GetMessage(const APriority,AAddress,ATag,AContent:String):String;
Description: To be documented
| Note | None documented |
|---|
function TSyslogClient.SendMessage(AFacility,ASeverity:LongWord; const ATag,AContent:String):LongWord;
Description: To be documented
| Note | None documented |
|---|
Return to Unit Reference