---
url: >-
  /statelake/scripting-reference/functions-and-procedures/logging-functions/loginfo.md
---

# LogInfo

**LogInfo** can be one of the most useful and versatile tools at your disposal.

**LogInfo** creates an entry in the action **Log** of type User Info.

**Declaration**: procedure LogInfo (aMesg : string);

A simple example follows.

```pascal
procedure OnMapEvent(var Value:Variant);
begin
 if MyData.EOF then
    LogInfo ('You are at the end of records in MyData recordset');
end;
```

**LogInfo** can be used for just about anything - as is illustrated in the **Log** snippet below, that was generated from the code block that follows.

```pascal
  vDigits := ['0','1','2','3','4','5','6','7','8','9'];
  vCurrSym := ['$',',','.'];
  vStr1 := '$123.00';                        // digits and currency symbols only
  vStr2 := 'NZD123.00';                      // includes alpha characters

  LogInfo('');
 // test first string ... it should be OK
 If StringContainsOnly(vStr1, vDigits + vCurrSym) then
    LogInfo('String "' + vStr1 + '" contains only 0-9,$,.')
 else
    LogInfo('String "' + vStr1 + '" contains other than 0-9,$,.');

 // test second string ... it should fail
 If StringContainsOnly(vStr2, vDigits + vCurrSym) then
    LogInfo('String "' + vStr2 + '" contains only 0-9,$,.')
 else
    LogInfo('String "' + vStr2 + '" contains other than 0-9,$,.');

  LogInfo('');
```

To cause a blank line in the **log**, use LogInfo('') as above.
