Difference between revisions of "Unit Logging"
From Ultibo.org
(9 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '''Ultibo Logging | + | '''Ultibo Logging Interface unit''' |
− | + | ||
− | + | ||
=== Constants === | === Constants === | ||
Line 50: | Line 48: | ||
|- | |- | ||
| <code>LOGGING_TYPE_SERIAL = 4;</code> | | <code>LOGGING_TYPE_SERIAL = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>LOGGING_TYPE_MAX = 4;</code> | ||
| | | | ||
|- | |- | ||
Line 64: | Line 67: | ||
|- | |- | ||
| <code>LOGGING_STATE_ENABLED = 1;</code> | | <code>LOGGING_STATE_ENABLED = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>LOGGING_STATE_MAX = 1;</code> | ||
| | | | ||
|- | |- | ||
Line 75: | Line 83: | ||
|- | |- | ||
| <code>LOGGING_FLAG_NONE = $00000000;</code> | | <code>LOGGING_FLAG_NONE = $00000000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Console logging''' <code> CONSOLE_LOGGING_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>CONSOLE_LOGGING_DESCRIPTION = 'Console Logging';</code> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
|- | |- | ||
Line 94: | Line 113: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|Note: | + | |colspan="2"|Note: Overlaid on TMessage to avoid memory allocation on each output |
|- | |- | ||
| <code>Data:String;</code> | | <code>Data:String;</code> | ||
− | | TMessage.Msg: | + | | TMessage.Msg:PtrUInt |
|- | |- | ||
− | | <code>Reserved1: | + | | <code>Reserved1:PtrUInt;</code> |
− | | TMessage.wParam: | + | | TMessage.wParam:PtrUInt |
|- | |- | ||
− | | <code>Reserved2: | + | | <code>Reserved2:PtrInt;</code> |
− | | TMessage.lParam: | + | | TMessage.lParam:PtrInt |
|- | |- | ||
| <code>Reserved3:LongWord;</code> | | <code>Reserved3:LongWord;</code> | ||
Line 120: | Line 139: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|Note: | + | |colspan="2"|Note: Overlaid on TMessage to avoid memory allocation on each output |
|- | |- | ||
| <code>Content:String;</code> | | <code>Content:String;</code> | ||
− | | TMessage.Msg: | + | | TMessage.Msg:PtrUInt |
|- | |- | ||
| <code>Tag:String;</code> | | <code>Tag:String;</code> | ||
− | | TMessage.wParam: | + | | TMessage.wParam:PtrUInt |
|- | |- | ||
− | | <code>Severity: | + | | <code>Severity:PtrInt;</code> |
− | | TMessage.lParam: | + | | TMessage.lParam:PtrInt |
|- | |- | ||
| <code>Facility:LongWord;</code> | | <code>Facility:LongWord;</code> | ||
Line 291: | Line 310: | ||
|- | |- | ||
| <code>Logging:TLoggingDevice;</code> | | <code>Logging:TLoggingDevice;</code> | ||
− | + | | | |
|- | |- | ||
|colspan="2"|''Console Properties'' | |colspan="2"|''Console Properties'' | ||
|- | |- | ||
| <code>Console:PConsoleDevice;</code> | | <code>Console:PConsoleDevice;</code> | ||
− | | | + | | The console device for logging output |
|- | |- | ||
| <code>Window:TWindowHandle;</code> | | <code>Window:TWindowHandle;</code> | ||
− | | | + | | The console window for logging output |
+ | |- | ||
+ | | <code>Existing:LongBool;</code> | ||
+ | | True if the console window already existed when logging started | ||
|- | |- | ||
|} | |} | ||
Line 322: | Line 344: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 334: | Line 356: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 349: | Line 371: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 361: | Line 383: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 373: | Line 395: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 385: | Line 407: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 397: | Line 419: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 409: | Line 431: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 421: | Line 443: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Default |
+ | | If true allow the new device the default logging device if there is no current default | ||
+ | |- | ||
+ | ! Return | ||
| Pointer to new Logging device entry or nil if Logging device could not be created | | Pointer to new Logging device entry or nil if Logging device could not be created | ||
|- | |- | ||
Line 433: | Line 458: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Size |
| Size in bytes to allocate for new Logging (Including the Logging entry) | | Size in bytes to allocate for new Logging (Including the Logging entry) | ||
|- | |- | ||
− | ! | + | ! Default |
+ | | If true allow the new device the default logging device if there is no current default | ||
+ | |- | ||
+ | ! Return | ||
| Pointer to new Logging device entry or nil if Logging device could not be created | | Pointer to new Logging device entry or nil if Logging device could not be created | ||
|- | |- | ||
Line 448: | Line 476: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 460: | Line 488: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 472: | Line 500: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 484: | Line 512: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 496: | Line 524: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 508: | Line 536: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 520: | Line 548: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 532: | Line 560: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 544: | Line 572: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 556: | Line 584: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 567: | Line 595: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 ConsoleLoggingStart(Logging:PLoggingDevice):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function ConsoleLoggingStart(Logging:PLoggingDevice):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of LoggingDeviceStart API for Console Logging</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;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | | + | | Not intended to be called directly by applications, use LoggingDeviceStart instead. |
|- | |- | ||
|} | |} | ||
Line 579: | Line 607: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 ConsoleLoggingStop(Logging:PLoggingDevice):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function ConsoleLoggingStop(Logging:PLoggingDevice):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of LoggingDeviceStop API for Console Logging</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;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | | + | | Not intended to be called directly by applications, use LoggingDeviceStop instead. |
|- | |- | ||
|} | |} | ||
Line 591: | Line 619: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 ConsoleLoggingOutput(Logging:PLoggingDevice; const Data:String):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function ConsoleLoggingOutput(Logging:PLoggingDevice; const Data:String):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of LoggingDeviceOutput API for Console Logging</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;" | ||
|- | |- | ||
− | ! '''Note''' | + | ! Note |
− | | | + | | Not intended to be called directly by applications, use LoggingDeviceOutput instead. |
+ | |- | ||
+ | |} | ||
+ | </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 ConsoleLoggingSetTarget(Logging:PLoggingDevice; const Target:String):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of LoggingDeviceSetTarget API for Console Logging</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, use LoggingDeviceSetTarget instead. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''RTL text IO functions''' | ||
+ | |||
+ | <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 SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handler for platform TextIOWriteChar function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications | ||
+ | |- | ||
+ | |} | ||
+ | </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 SysTextIOWriteBuffer(ABuffer:PChar; ACount:LongInt; AUserData:Pointer):LongInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handler for platform TextIOWriteBuffer function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications | ||
|- | |- | ||
|} | |} | ||
Line 610: | Line 677: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 622: | Line 689: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 632: | Line 699: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 LoggingDeviceGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function LoggingDeviceGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current logging device count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current logging device count</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;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 644: | Line 711: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 LoggingDeviceGetDefault:PLoggingDevice | + | <pre style="border: 0; padding-bottom:0px;">function LoggingDeviceGetDefault:PLoggingDevice;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default logging device</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default logging device</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;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 661: | Line 728: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 673: | Line 740: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | 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;"> | ||
+ | {| 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 LoggingDeviceRedirectOutput(Logging:PLoggingDevice):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Redirect standard output to the logging device specified by Logging</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Logging | ||
+ | | The logging device to redirect output to (or nil to stop redirection) | ||
+ | |- | ||
+ | ! Return | ||
+ | | True if completed successfully or False if an error occurred | ||
+ | |- | ||
+ | ! Note | ||
+ | | Redirects the output of the text files Output, ErrOutput, StdOut and StdErr which also redirects the output of Write, WriteLn and the standard C library. | ||
|- | |- | ||
|} | |} | ||
Line 685: | Line 794: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 697: | Line 806: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 709: | Line 818: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 721: | Line 830: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 733: | Line 842: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- |
Latest revision as of 05:27, 1 March 2023
Return to Unit Reference
Contents
[hide]Description
Ultibo Logging Interface unit
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
Logging entry ex
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
Console logging
Public variables
None defined
Function declarations
Initialization functions
Logging functions
[Expand]
function LoggingDeviceStart(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: Implementation of LoggingDeviceStart API for Console Logging
[Expand]
function ConsoleLoggingStop(Logging:PLoggingDevice):LongWord;
Description: Implementation of LoggingDeviceStop API for Console Logging
[Expand]
function ConsoleLoggingOutput(Logging:PLoggingDevice; const Data:String):LongWord;
Description: Implementation of LoggingDeviceOutput API for Console Logging
[Expand]
function ConsoleLoggingSetTarget(Logging:PLoggingDevice; const Target:String):LongWord;
Description: Implementation of LoggingDeviceSetTarget API for Console Logging
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 SysLoggingOutputEx(AFacility,ASeverity:LongWord; const ATag,AContent:String);
Description: To be documented
Logging helper functions
[Expand]
function LoggingDeviceGetDefault:PLoggingDevice;
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