Help understanding syslog-ng open-source code
Hey guys, im trying to implement a few features for the open-source version of syslog-ng. I am going to build my own device driver to better fit my needs. My problem with this task is, that the source code lacks proper commenting and you can easily get lost. Now I wanted to know if theres some special forum or source code documentation and if not, is there someone who is able and willing to answer some questions about the syslog-ng code? This would give my work a huge boost. Thanks for your responses in advance, Emanuel
On Tue, 2007-11-27 at 15:42 +0100, emanuel wrote:
Hey guys,
im trying to implement a few features for the open-source version of syslog-ng. I am going to build my own device driver to better fit my needs.
My problem with this task is, that the source code lacks proper commenting and you can easily get lost. Now I wanted to know if theres some special forum or source code documentation and if not, is there someone who is able and willing to answer some questions about the syslog-ng code? This would give my work a huge boost.
Thanks for your responses in advance,
Although the source code is not very much commented, it is carefully structured, and a great care is taken in identifier naming. Once you get used to the rules, the code is quite readable. (of course, as I have written it). Can you tell us a bit about your aims? Questions are usually asked here, I also try to answer code related questions, it all depends on the volume :) and my availability. -- Bazsi
Thanks for your reply. Its great to know I can get such competent help. At first I probably should mention Im only a intermediate programmer so bear with me. My aim is to implement my own destination device driver for example to connect to a database (yes I know there are already a few workarounds and the premium edition supports this too). But in the long run I want to be able to modify your program further and I think this would be a good and not too hard start. A question I have at the moment would be, I dont get the message flow from source to destination. Lets say I dont care about the source and I implement a new destination, where does the log message from source meet the new destination? As I gathered the connection is made in the logpipe/center file. Am I wrong and/or did I miss something. I ask because this is so rarely used in the code, mainly at the point of definition and then in cfg and cfg-grammer file. BTW, comments are usually NOT for the programmer ^^ Emanuel Balazs Scheidler schrieb:
On Tue, 2007-11-27 at 15:42 +0100, emanuel wrote:
Hey guys,
im trying to implement a few features for the open-source version of syslog-ng. I am going to build my own device driver to better fit my needs.
My problem with this task is, that the source code lacks proper commenting and you can easily get lost. Now I wanted to know if theres some special forum or source code documentation and if not, is there someone who is able and willing to answer some questions about the syslog-ng code? This would give my work a huge boost.
Thanks for your responses in advance,
Although the source code is not very much commented, it is carefully structured, and a great care is taken in identifier naming. Once you get used to the rules, the code is quite readable. (of course, as I have written it).
Can you tell us a bit about your aims?
Questions are usually asked here, I also try to answer code related questions, it all depends on the volume :) and my availability.
On Tue, 2007-11-27 at 23:40 +0100, emanuel wrote: [...]
BTW, comments are usually NOT for the programmer ^^
Then you have never had to support or modify something you wrote more than two months ago. ;) -- Matt Zagrabelny - mzagrabe@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems & Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot
But its probably even worse for the new guy who has no idea what you did (... that would be me ^^). Furthermore your point adds to mine in that we both agree comments are really helpful. Matt Zagrabelny schrieb:
On Tue, 2007-11-27 at 23:40 +0100, emanuel wrote:
[...]
BTW, comments are usually NOT for the programmer ^^
Then you have never had to support or modify something you wrote more than two months ago. ;)
------------------------------------------------------------------------
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
On Tue, 2007-11-27 at 16:45 -0600, Matt Zagrabelny wrote:
On Tue, 2007-11-27 at 23:40 +0100, emanuel wrote:
[...]
BTW, comments are usually NOT for the programmer ^^
Then you have never had to support or modify something you wrote more than two months ago. ;)
I could not agree more, I just said that it matters more how the code is organized, naming consistency etc. -- Bazsi
participants (3)
-
Balazs Scheidler
-
emanuel
-
Matt Zagrabelny