Recent

Author Topic: Threadsafe logging to /var/log/something  (Read 3124 times)

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Threadsafe logging to /var/log/something
« on: March 09, 2012, 06:03:50 pm »
I'm running a server and want to log exceptions like "on E:Exception do writeln(logfile, E.Message)". How do I do that in a clean way at /var/log/mylog?
PS: Of course, my service is started with admin rights.
Lazarus 1.7 (SVN) FPC 3.0.0

zeljko

  • Hero Member
  • *****
  • Posts: 1150
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Threadsafe logging to /var/log/something
« Reply #1 on: March 10, 2012, 02:19:05 pm »
your_fpc/packages/syslog

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: Threadsafe logging to /var/log/something
« Reply #2 on: March 11, 2012, 11:14:33 am »
Thanks a lot. I found a handy wrapper: TEventLog (uses eventlog).
Lazarus 1.7 (SVN) FPC 3.0.0

 

TinyPortal © 2005-2018