-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2016-04-11 00:55, Xen wrote:
Per Jessen schreef op 10-04-16 10:19:
In principle this is absolutely true, in practice for a write2log() call, less so. Unless that call was part of a framework I wanted to use in my application anyway, I would not bother. It would take me less time to write my own than to learn how to use a foreign one.
Probably, but that depends on how complex those other ones are, and whether you can use it with a few simple command calls.
For instance "logger" is clearly not a complex tool. If it had a little more functionality, the same interface would be very easy to use in a script (or program).
What else do you want it to do? I use it often in scripts, that's what it is for.
The question was whether they exist. Logrotation and asynchronous writing and all of that is not that easy to implement. Sure, if you spend a few hours to a few days on it, sure you might have something. The whole purpose of me asking was to help the OP (and myself) to see if something might not be missing here.
If every application writes its own logging framework, that's a lot of wasted effort. Apparently you want me to start exploring the source of e.g. squid to see how it does it. I would think people would know about these answers.
I gave you a dozen examples of programs you could examine. Yes, if I'm going to create a complicated application, certainly I will examine code examples I may reuse!
Writing it yourself means spending an amount of time you were trying to avoid to see if something else did not already exist.
I use my own log often enough in my scripts. As simple as a simple function that calls "echo" with a timestamp and a file destination, that's all. I don't see the difficulty... You said, I think, you coded in Delphi. Then have a look at Lazarus, it is a multiplatform remake of Delphi. Just write to a text file with a cache. Or look in the examples to find something else... - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlcK7eQACgkQja8UbcUWM1wz3wD8CgUaGnOHzaPpI2/kLiknxi/Y 9XuCrKCxSlUveTr9nNUA/0fXteLE+cuHFh1Olb2Rs6Re57uyZS2m1+p++E3f/VVR =GYRY -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org