[strongSwan-dev] [PATCH 8/8] Use thread id as retrieved by gettid in log messages

Andreas Steffen andreas.steffen at strongswan.org
Wed Dec 14 20:47:18 CET 2011


Hello Tobias,

I would prefer a statement mapping the actual long thread ID
to our shortened ID when the thread is being created. I remember
those thread IDs to be quite messy so I wouldn't like to return
to them.

Regards

Andreas

On 14.12.2011 19:00, Tobias Brunner wrote:
> Hi Thomas,
> 
>> Especially when working with core dumps it proved useful to have
>> charon's log messages prefixed with the thread id instead of the
>> human readable thread number.
> 
> Changing the current human-readable thread number to the actual thread
> ID makes the logs quite a bit harder to read.  Not only are the IDs
> longer than the numbers, their range also varies significantly between
> individual runs.  But I definitely see the benefit of knowing those IDs
> when debugging code.  There are several possible ways to implement this.
>  We could, for instance, log the thread ID only when a new thread is
> added to the thread pool, this would then allow to map the number to the
> ID if needed.  Or we could add a new setting to strongswan.conf, which
> would allow users to configure whether the thread number or the thread
> ID is used during logging (defaulting to the number).  The question is
> essentially whether it is required that the actual thread ID is logged
> at the beginning of every line or if listing them once during startup is
> enough.
> 
> @Andreas, @Martin: What are your thoughts on this?
> 
> Regards,
> Tobias

======================================================================
Andreas Steffen                         andreas.steffen at strongswan.org
strongSwan - the Linux VPN Solution!                www.strongswan.org
Institute for Internet Technologies and Applications
University of Applied Sciences Rapperswil
CH-8640 Rapperswil (Switzerland)
===========================================================[ITA-HSR]==

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4489 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.strongswan.org/pipermail/dev/attachments/20111214/4c136f19/attachment.bin>


More information about the Dev mailing list