Page 1 of 1
Forum

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!



Share:
Notifications
Clear all

[Solved] Lazarus - MacOS X - How to write messages to the Console (in Utilities)

1 Posts
1 Users
0 Reactions
2,099 Views
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter  

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');

   
ReplyQuote
Share: