[strongSwan] How to change group names in syslog

T Cheung tccheung1 at gmail.com
Thu Apr 19 20:34:27 CEST 2012


Hi Tobias,

If sys_logger.c is the right place, could I just increase the group string size
and add the suffix to pattern like this:

snprintf(groupstr, sizeof(groupstr), "%N-MS", debug_names, group);

I tried this but didn't see any effect, but maybe because I didn't
install everything.  Which binary
needs to be rebuilt and installed when I changed sys_logger.c?

I need to change group name because there is another charon running on
the same host
for other features.

Regards,
Terry

On Wed, Apr 18, 2012 at 11:52 PM, Tobias Brunner <tobias at strongswan.org> wrote:
> Hi Terry,
>
>> Initially I thought I could just change the debug_names values in
>> src/libstrongswan/debug.c to add the suffix, but that didn't seem to
>> have any effect. I see that some code actually limits group name
>> string length to 4 (including NULL).
>
> Both of these observations are true.  The log messages are eventually
> logged by listeners registered on the global message bus.  For logging
> to syslog this is src/libcharon/bus/listeners/sys_logger.c and for
> logging to files it's file_logger.c in the same directory.  There are
> other loggers in individual plugins.  Of the two loggers above only the
> syslogger limits the group string to 4 characters, so increasing the
> buffer there should allow you to see the longer group names.
>
>> Do you know if there is an easy change to add a suffix like "-MS" to
>> all group names?
>
> Just out of curiosity, what's the reason you want to change these in the
> first place?
>
> Regards,
> Tobias




More information about the Users mailing list