Re: [PATCH] custom access-log format

Nisan Bloch <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Stipe

Perfect timing - we have such an item on our current to do lists.

Looks good - compiles and works with brief testing on our dev box.

Nisan
At 04:47 PM 2003/11/24, Stipe Tolj wrote:

>Hi list,
>
>the attached patches is a feature add in terms of customizing the
>access-log format for bearerbox. This will allow to use custom format
>access-log lines using escape codes (commonly known from the
>sms-service groups).
>
>Here are the changes:
>
>   * gw/bb_alog.c: handles the custom bearerbox access-log formating
>   * gw/bb_smscconn.c: moved log_sms() to gw/bb_alog.c:bb_alog_sms()
>   * gw/bearerbox.h: added bb_alog_ prototypes
>   * gw/[sms|wap]box.c: harmonized access-log config directive reading
>   * gwlib/accesslog.[ch]: alog_open() changed to indicate if markers
>should be written to access-log file. If no markers are set, then the
>default timestamp prefix is not written, allowing users to
>individually set the timestamp in their custom access-log format.
>   * gwlib/cfg.def: added config directives 'access-log-time' to
>indicate if localtime or gmt should be used within access-log,
>'access-log-format' holding the escape code formated line to log,
>'access-log-clean' (boolean) indicating if standard markers shoould be
>avoided and hence the access-log should be "clean".
>
>Which means you can use this core group for bearerbox in your
>configuration:
>
>   group = core
>   admin-port = 13000
>   smsbox-port = 13001
>   admin-password = bar
>   ...
>   access-log = "/var/log/kannel/access.log"
>   access-log-clean = yes
>   #access-log-time = gmt
>   access-log-format = "%t %l [SMSC:%i] [SVC:%n] [ACT:%A] [BINF:%B]
>[from:%p] [to:%P] [flags:%m:%c:%M:%C:%d] [msg:%L:%b] [udh:%U:%u]"
>   ...
>   store-file = "/var/log/kannel/kannel.store"
>
>which would cause bearerbox to log in our "default" access-log style.
>
>
>Please try and have a vote on it. If no vetos occur, I'll commit this
>to cvs.
>
>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-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.