Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
[Solved] Lazarus - MacOS X - How to write messages to the Console (in Utilities)
Delphi, Lazarus, Free Pascal
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
October 5, 2015 10:18 AM
It's not that hard to leave messages in the Console application (logs - found in Utilities).
This needs "process" in the "uses" clause.
procedure WriteSystemLog(MessageTag, Message: string);
var s : ansistring;
begin
RunCommand('/usr/bin/logger',['-t',MessageTag,Message], s);
end;
The "MessageTag" is typically your application or process name.
And the "Message" is whatever you'd like to put in the log.
So for example:
WriteSystemLog('MyApp', 'Initialization OK');