[RADIATOR] Log file encoding
Tim Jones
tim.jones at fon.com
Thu Jun 18 02:46:41 CDT 2015
Thanks for the response.
I recommend considering a separate utility to process the logs to your log
> storage system.
Essentially what I have been specced to build, but it's a batch-processing
after-the-fact, so we only have the log files to go on. I will suggest the
idea of logging to something else in addition to files (Syslog\SQL) but I
have been rebuffed in the past on this same point. Though since this also
fixes other problems (users leaving carriage-returns in user-name fields
splitting the log line when printed to a file), I may get a better
reception this time around.
There's currently no option to make sure all characters in log messages are
> from e.g., us-ascii.
Are there plans to add support for this? Looking into it it seems that, for
Perl, simply having a call to open(FILE, ">>$filename") replaced with
open(FILE,
'>>:encoding(UTF-8)', $filename) should do the trick. Since it looks as if
all log file writing is done via Radius::Util::append, would it be a hard
feature to add?
Many thanks for your time,
[image: Fon] <http://www.fon.com/>Tim JonesSoftware Development+34 612345678
C/ Quintanavides 15, Edificio 2, Planta 1ª
Parque Empresarial Vía Norte de Metrovacesa
Las Tablas
28050 MadridSkype: tim.jones.fonAll information in this email is
confidential <http://corp.fon.com/legal/email-disclaimer>
On 18 June 2015 at 09:20, Heikki Vatiainen <hvn at open.com.au> wrote:
> On 17.6.2015 11.10, Tim Jones wrote:
>
> > I've been asked to ensure that the log files created by our Radiator
> > instance are using a consistant particular character encoding. As when
> > doing some analysis, it has been discovered that some logs are latin1,
> > some us-ascii, and some utf-8.
>
> Mostly they should be in us-ascii, but some log messages include binary
> attribute values, output from libraries and other non-Radiator Perl
> modules, Radius messages, etc. and this can cause non-ascii characters
> in logs.
>
> > I cannot find any reference to character encoding within the Radiator
> > documentation, but of course all string-type attributes in the RADIUS
> > protocol are defined as UTF-8 encoded so I would have expected that of
> > the Radiator logs as well.
>
> The RFCs specify UTF-8, but it is not uncommon to see other encodings
> too. For example, a web captive portal may have its login page
> configured to use UTF-8 or ISO-8859-15. When a user logs in, their
> username may be passed unmodified to RADIUS authentication by the
> controller.
>
> > Is there an option supporting this within Radiator, or is it more do
> > with with the Perl environment as a whole?
>
> I recommend considering a separate utility to process the logs to your
> log storage system. Especially when you use debug logging, the logs will
> contain non-ascii characters. There's currently no option to make sure
> all characters in log messages are from e.g., us-ascii.
>
> Thanks,
> Heikki
>
> --
> Heikki Vatiainen <hvn at open.com.au>
>
> Radiator: the most portable, flexible and configurable RADIUS server
> anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
> Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
> TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
> DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
> NetWare etc.
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20150618/22290a71/attachment.html
More information about the radiator
mailing list