Difference between revisions of "Unit Logging"

From Ultibo.org
Jump to: navigation, search
Line 50: Line 50:
 
|-
 
|-
 
| <code>LOGGING_TYPE_SERIAL = 4;</code>
 
| <code>LOGGING_TYPE_SERIAL = 4;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>LOGGING_TYPE_MAX = 4;</code>
 
| &nbsp;
 
| &nbsp;
 
|-
 
|-
Line 64: Line 69:
 
|-
 
|-
 
| <code>LOGGING_STATE_ENABLED = 1;</code>
 
| <code>LOGGING_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>LOGGING_STATE_MAX = 1;</code>
 
| &nbsp;
 
| &nbsp;
 
|-
 
|-
Line 108: Line 118:
 
|-
 
|-
 
| <code>Data:String;</code>
 
| <code>Data:String;</code>
| TMessage.Msg:LongWord
+
| TMessage.Msg:PtrUInt
 
|-
 
|-
| <code>Reserved1:LongInt;</code>
+
| <code>Reserved1:PtrUInt;</code>
| TMessage.wParam:LongInt
+
| TMessage.wParam:PtrUInt
 
|-
 
|-
| <code>Reserved2:LongInt;</code>
+
| <code>Reserved2:PtrInt;</code>
| TMessage.lParam:LongInt
+
| TMessage.lParam:PtrInt
 
|-
 
|-
 
| <code>Reserved3:LongWord;</code>
 
| <code>Reserved3:LongWord;</code>
Line 134: Line 144:
 
|-
 
|-
 
| <code>Content:String;</code>
 
| <code>Content:String;</code>
| TMessage.Msg:LongWord
+
| TMessage.Msg:PtrUInt
 
|-
 
|-
 
| <code>Tag:String;</code>
 
| <code>Tag:String;</code>
| TMessage.wParam:LongInt
+
| TMessage.wParam:PtrUInt
 
|-
 
|-
| <code>Severity:LongInt;</code>
+
| <code>Severity:PtrInt;</code>
| TMessage.lParam:LongInt
+
| TMessage.lParam:PtrInt
 
|-
 
|-
 
| <code>Facility:LongWord;</code>
 
| <code>Facility:LongWord;</code>
Line 708: Line 718:
 
<pre style="border: 0; padding-bottom:0px;">function LoggingDeviceCheck(Logging:PLoggingDevice):PLoggingDevice;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function LoggingDeviceCheck(Logging:PLoggingDevice):PLoggingDevice;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Logging device is in the Logging table</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Logging device is in the Logging table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function LoggingTypeToString(LoggingType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Logging type value to a string</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function LoggingStateToString(LoggingState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Logging state value to a string</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"

Revision as of 04:44, 10 June 2021

Return to Unit Reference


Description


Ultibo Logging interface unit

To be documented

Constants



[Expand]
Logging specific constants LOGGING_*


[Expand]
Logging device type LOGGING_TYPE_*


[Expand]
Logging device state LOGGING_STATE_*


[Expand]
Logging device flag LOGGING_FLAG_*


[Expand]
Console logging CONSOLE_LOGGING_*


Type definitions



Logging entry

[Expand]

PLoggingEntry = ^TLoggingEntry;

TLoggingEntry = record

Logging entry ex

[Expand]

PLoggingEntryEx = ^TLoggingEntryEx;

TLoggingEntryEx = record

Logging enumeration callback

TLoggingEnumerate = function(Logging:PLoggingDevice; Data:Pointer):LongWord;

Logging notification callback

TLoggingNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

Logging device start

TLoggingDeviceStart = function(Logging:PLoggingDevice):LongWord;

Logging device stop

TLoggingDeviceStop = function(Logging:PLoggingDevice):LongWord;

Logging device output

TLoggingDeviceOutput = function(Logging:PLoggingDevice; const Data:String):LongWord;

Logging device output ex

TLoggingDeviceOutputEx = function(Logging:PLoggingDevice; Facility,Severity:LongWord; const Tag,Content:String):LongWord; Syslog compatible output

Logging device get target

TLoggingDeviceGetTarget = function(Logging:PLoggingDevice):String;

Logging device set target

TLoggingDeviceSetTarget = function(Logging:PLoggingDevice; const Target:String):LongWord;

Logging device

[Expand]

PLoggingDevice = ^TLoggingDevice;

TLoggingDevice = record

Console logging

[Expand]

PConsoleLogging = ^TConsoleLogging;

TConsoleLogging = record


Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure LoggingInit;
Description: To be documented


[Expand]
function LoggingExecute(Parameter:Pointer):PtrInt;
Description: To be documented


Logging functions

[Expand]
function LoggingDeviceStart(Logging:PLoggingDevice):LongWord;
Description: To be documented


[Expand]
function LoggingDeviceStop(Logging:PLoggingDevice):LongWord;
Description: To be documented


[Expand]
function LoggingDeviceOutput(Logging:PLoggingDevice; const Data:String):LongWord;
Description: To be documented


[Expand]
function LoggingDeviceOutputEx(Logging:PLoggingDevice; Facility,Severity:LongWord; const Tag,Content:String):LongWord;
Description: To be documented


[Expand]
function LoggingDeviceGetTarget(Logging:PLoggingDevice):String;
Description: To be documented


[Expand]
function LoggingDeviceSetTarget(Logging:PLoggingDevice; const Target:String):LongWord;
Description: To be documented


[Expand]
function LoggingDeviceCreate(Default:Boolean):PLoggingDevice;
Description: Create a new Logging device entry


[Expand]
function LoggingDeviceCreateEx(Size:LongWord; Default:Boolean):PLoggingDevice;
Description: Create a new Logging device entry


[Expand]
function LoggingDeviceDestroy(Logging:PLoggingDevice):LongWord;
Description: Destroy an existing Logging device entry


[Expand]
function LoggingDeviceRegister(Logging:PLoggingDevice):LongWord;
Description: Register a new Logging device in the Logging table


[Expand]
function LoggingDeviceDeregister(Logging:PLoggingDevice):LongWord;
Description: Deregister a Logging device from the Logging table


[Expand]
function LoggingDeviceFind(LoggingId:LongWord):PLoggingDevice;
Description: To be documented


[Expand]
function LoggingDeviceFindByType(LoggingType:LongWord):PLoggingDevice;
Description: To be documented


[Expand]
function LoggingDeviceFindByDevice(Device:PDevice):PLoggingDevice;
Description: To be documented


[Expand]
function LoggingDeviceFindByName(const Name:String):PLoggingDevice; inline;
Description: To be documented


[Expand]
function LoggingDeviceFindByDescription(const Description:String):PLoggingDevice; inline;
Description: To be documented


[Expand]
function LoggingDeviceEnumerate(Callback:TLoggingEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function LoggingDeviceNotification(Logging:PLoggingDevice; Callback:TLoggingNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


Console logging functions

[Expand]
function ConsoleLoggingStart(Logging:PLoggingDevice):LongWord;
Description: To be documented


[Expand]
function ConsoleLoggingStop(Logging:PLoggingDevice):LongWord;
Description: To be documented


[Expand]
function ConsoleLoggingOutput(Logging:PLoggingDevice; const Data:String):LongWord;
Description: To be documented


RTL text IO functions

[Expand]
function SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Description: Handler for platform TextIOWriteChar function


[Expand]
function SysTextIOWriteBuffer(ABuffer:PChar; ACount:LongInt; AUserData:Pointer):LongInt;
Description: Handler for platform TextIOWriteBuffer function


RTL logging functions

[Expand]
procedure SysLoggingOutput(const AText:String);
Description: To be documented


[Expand]
procedure SysLoggingOutputEx(AFacility,ASeverity:LongWord; const ATag,AContent:String);
Description: To be documented


Logging helper functions

[Expand]
function LoggingDeviceGetCount:LongWord; inline;
Description: Get the current logging device count


[Expand]
function LoggingDeviceGetDefault:PLoggingDevice; inline;
Description: Get the current default logging device


[Expand]
function LoggingDeviceSetDefault(Logging:PLoggingDevice):LongWord;
Description: Set the current default logging device


[Expand]
function LoggingDeviceCheck(Logging:PLoggingDevice):PLoggingDevice;
Description: Check if the supplied Logging device is in the Logging table


[Expand]
function LoggingTypeToString(LoggingType:LongWord):String;
Description: Convert a Logging type value to a string


[Expand]
function LoggingStateToString(LoggingState:LongWord):String;
Description: Convert a Logging state value to a string


[Expand]
function LoggingDeviceRedirectOutput(Logging:PLoggingDevice):Boolean;
Description: Redirect standard output to the logging device specified by Logging


[Expand]
function LoggingGetMessageslotFlags:LongWord;
Description: Get the lock flags for the logging messageslot


[Expand]
function LoggingConsoleDeviceAdd(Console:PConsoleDevice):LongWord;
Description: To be documented


[Expand]
function LoggingConsoleDeviceRemove(Console:PConsoleDevice):LongWord;
Description: To be documented


[Expand]
function LoggingConsoleDeviceEnum(Console:PConsoleDevice; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function LoggingConsoleDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Description: To be documented


Return to Unit Reference