https://wiki.freepascal.org/Daemons_and_Servicescopy-paste error ?
I modified the code below and now it works, so looks like the demo needs a small fix to the Format function call (seems it wants 2 parameters string and number )?
The code in the wiki is correct, but download demo project is wrong?Indeed i was copying the wiki entry. Because I did not trusted it I downloaded the zipfile and indeed there the error is present.
LogToFile(Format('Daemon %s received start signal, PID:%d', ['the_name_of_your_daemon', GetProcessID]));
or replace it as per wiki entry.