TjachLogTopicIndex - jachguate/jachLogMgr GitHub Wiki
unit: ujachLogMgr
declaration: TjachLogTopicIndex = 0..63;
intrinsic type: Byte
TjachLogTopicIndex type
The topics are identified within the library by it's index which is a number between 0 and 63. This also means the library supports up to 64 topics.
If you use topics, the recommendation is you declare some constants to make your code readable and maintain consistency, for example:
const
LTOPIC_GENERAL = 0;
LTOPIC_AUTHORIZATION = 1;
LTOPIC_COMMUNICATIONS = 3;
procedure MyProcedure();
begin
jachLog.LogInfo(LTOPIC_GENERAL, 'Daily automatic order checker started');
SetupProcess();
jachLog.LogInfo(LTOPIC_AUTHORIZATION, 'The process was authorized by %s', [Security.Authorization.UserName]);
Etc();
try
SendConfirmationEmails();
except
on E: Exception do
begin
jachLog.LogError(LTOPIC_COMMUNICATIONS, 'Send mail failed with error: ', E);
raise;
end;
end;
end;
Remember the max value you can use as a topic index is 63.
For more information read log topics and filter by severity level by topic