Hi list, we'd like to add the pid (process id) logging into the standard Kannel output log format. This may be used for further thread and process debugging. This would imply the change of the log-file format
from <timestamp> [<thread id>] <log-level> <log message> to <timestamp> [<process id>] [<thread-id>] <log-level> <log message> so we _add_ the pid as second argument of the log format. We use getpid() in gwlib/gwthread-pthread.c:new_thread() to get the thread process id of the OS and safe it to the threadinfo structure. While formating the log line, we call a function which is similar to gwthread_self() and returns two values, the tid and pid, writing those to the log line. So there is no performance decrease in doing this. Any objections to modify the standard log-file format into this? NOTE: this may imply of source that people who do analyze the logs would have to change parser routines or regex expressions accordingly. Stipe mailto:[EMAIL PROTECTED] ------------------------------------------------------------------- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ ------------------------------------------------------------------- -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -----END PGP PUBLIC KEY BLOCK-----