Hello. I wrote a small patch to add colorization to syslog-ng. The idea is to apply different color schemes to messages (that are going to a tty, for example) depending on their type and importance and using standard syslog-ng filters. IMHO this makes tty log much more readable. There is a new keyword: 'scheme'. "scheme { ... }" construction binds colors to message fields and "scheme()" field of "log {...}" adds scheme filter that colorizes the output (before it will be sent to destination). The filter uses ANSI escape sequences but it's easy to extend it to anything else. Color support is enabled with defining 'ENABLE_COLOR' or using '--enable-colors' in configure script. If you'll find it useful you can use it :) The patch and example (draft) syslog-ng.conf are attached. -- Gaydov Victor. Practically perfect people never permit sentiment to muddle their thinking. -- Mary Poppins
Hi, Thanks for your contribution. It is really appreciated. There are two questions regarding the integration of your contribution: 1) can you please you (or your employer) sign the contributory license agreement (http://www.balabit.com/dl/CLA_patch.pdf), this allows us to synchronize the OSE tree with the PE tree (which let's us flow patches in both directions) 2) in addition to the legalese, I'd like to know if there's anyone else who would think this feature is useful as a core syslog-ng feature. I'm working on a way to make syslog-ng plugins possible, where this module would make perfect sense. However we're still not there yet, but I don't want to keep useful functionality outside just because I'm not yet finished with the plugin code. So is there anyone who would also use message coloring? Do you need this flexibility as the patch supports? Thanks for anyone who takes the time to respond. On Tue, 2009-12-01 at 00:15 +0300, Gaydov Victor wrote:
Hello.
I wrote a small patch to add colorization to syslog-ng. The idea is to apply different color schemes to messages (that are going to a tty, for example) depending on their type and importance and using standard syslog-ng filters. IMHO this makes tty log much more readable.
There is a new keyword: 'scheme'. "scheme { ... }" construction binds colors to message fields and "scheme()" field of "log {...}" adds scheme filter that colorizes the output (before it will be sent to destination).
The filter uses ANSI escape sequences but it's easy to extend it to anything else. Color support is enabled with defining 'ENABLE_COLOR' or using '--enable-colors' in configure script.
If you'll find it useful you can use it :) The patch and example (draft) syslog-ng.conf are attached.
-- Gaydov Victor.
Practically perfect people never permit sentiment to muddle their thinking. -- Mary Poppins ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
-- Bazsi
Hi, In my personal opinion the core of syslog-ng should limit itself to routing log messages and leave the interpretation of the importance of the messages to other applications. So, keep programs small and dedicated to a single task. Regards, Siem Korteweg -----Oorspronkelijk bericht----- Van: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] Namens Balazs Scheidler Verzonden: zondag 6 december 2009 16:34 Aan: Syslog-ng users' and developers' mailing list Onderwerp: Re: [syslog-ng] colored messages Hi, Thanks for your contribution. It is really appreciated. There are two questions regarding the integration of your contribution: 1) can you please you (or your employer) sign the contributory license agreement (http://www.balabit.com/dl/CLA_patch.pdf), this allows us to synchronize the OSE tree with the PE tree (which let's us flow patches in both directions) 2) in addition to the legalese, I'd like to know if there's anyone else who would think this feature is useful as a core syslog-ng feature. I'm working on a way to make syslog-ng plugins possible, where this module would make perfect sense. However we're still not there yet, but I don't want to keep useful functionality outside just because I'm not yet finished with the plugin code. So is there anyone who would also use message coloring? Do you need this flexibility as the patch supports? Thanks for anyone who takes the time to respond. On Tue, 2009-12-01 at 00:15 +0300, Gaydov Victor wrote:
Hello.
I wrote a small patch to add colorization to syslog-ng. The idea is to apply different color schemes to messages (that are going to a tty, for example) depending on their type and importance and using standard syslog-ng filters. IMHO this makes tty log much more readable.
There is a new keyword: 'scheme'. "scheme { ... }" construction binds colors to message fields and "scheme()" field of "log {...}" adds scheme filter that colorizes the output (before it will be sent to destination).
The filter uses ANSI escape sequences but it's easy to extend it to anything else. Color support is enabled with defining 'ENABLE_COLOR' or using '--enable-colors' in configure script.
If you'll find it useful you can use it :) The patch and example (draft) syslog-ng.conf are attached.
-- Gaydov Victor.
Practically perfect people never permit sentiment to muddle their thinking. -- Mary Poppins
_____________________________________________________________________________ _
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
-- Bazsi _____________________________________________________________________________ _ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
Thanks.
1) can you please you (or your employer) sign the contributory license agreement (http://www.balabit.com/dl/CLA_patch.pdf), this allows us to synchronize the OSE tree with the PE tree (which let's us flow patches in both directions)
Is it enough to send signed (scanned) pdf via email? (I've sent it to info@balabit.com)
In my personal opinion the core of syslog-ng should limit itself to routing log messages and leave the interpretation of the importance of the messages to other applications. So, keep programs small and dedicated to a single task.
I only can say that my goal was to use syslog-ng filters to apply different schemes - that's why I don't use other tools. -- Gaydov Victor. Half the world is composed of people who have something to say and can't, and the other half who have nothing to say and keep on saying it.
On Tue, 2009-12-08 at 00:35 +0300, Gaydov Victor wrote:
Thanks.
1) can you please you (or your employer) sign the contributory license agreement (http://www.balabit.com/dl/CLA_patch.pdf), this allows us to synchronize the OSE tree with the PE tree (which let's us flow patches in both directions)
Is it enough to send signed (scanned) pdf via email? (I've sent it to info@balabit.com)
should be enough, yes, thank you.
In my personal opinion the core of syslog-ng should limit itself to routing log messages and leave the interpretation of the importance of the messages to other applications. So, keep programs small and dedicated to a single task.
I only can say that my goal was to use syslog-ng filters to apply different schemes - that's why I don't use other tools.
Any other opinions about this colorization stuff? -- Bazsi
I second Siem's opinion that I think syslog-ng should be the log routing work horse and leave as much output to auxiliary programs as possible. In my opinion, it would be far better to tag messages with a color tag using the db-parser() module and have a simple script change the text to the appropriate color. The brand-new pattern db that was just released is far more valuable to me personally than output formatting features. On the other hand, I do recognize that not all users want to spend time scripting, so perhaps it is valuable to others. --Martin On Fri, Dec 11, 2009 at 3:26 AM, Balazs Scheidler <bazsi@balabit.hu> wrote:
On Tue, 2009-12-08 at 00:35 +0300, Gaydov Victor wrote:
Thanks.
1) can you please you (or your employer) sign the contributory license agreement (http://www.balabit.com/dl/CLA_patch.pdf), this allows us to synchronize the OSE tree with the PE tree (which let's us flow patches in both directions)
Is it enough to send signed (scanned) pdf via email? (I've sent it to info@balabit.com)
should be enough, yes, thank you.
In my personal opinion the core of syslog-ng should limit itself to routing log messages and leave the interpretation of the importance of the messages to other applications. So, keep programs small and dedicated to a single task.
I only can say that my goal was to use syslog-ng filters to apply different schemes - that's why I don't use other tools.
Any other opinions about this colorization stuff?
-- Bazsi
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
Balazs Scheidler <bazsi@balabit.hu> wrote:
Any other opinions about this colorization stuff?
FWIW, I have no use for color coding of messages, and I also agree with other posters that sticking to the "do one thing and do it well" mantra is a good idea. Without so much as looking at the suggested patch, would it be possible to abstract the color coding part into a standalone tool? Something that takes a configuration file with regex=>color mappings, for example, allowing any user to color code any content via (pardon the uuoc): cat file | colorize That would seem useful for all sorts of applications, not just syslog messages. -Jan
participants (5)
-
Balazs Scheidler
-
Gaydov Victor
-
Jan Schaumann
-
Martin Holste
-
Siem Korteweg