linelog csv quoting problem

Matthew Newton mcn4 at leicester.ac.uk
Fri Jul 15 11:40:08 CEST 2016


On Fri, Jul 15, 2016 at 10:26:55AM +0200, Adamczak Krzysztof wrote:
> OK. I've got another idea. Please tell me what do you think of it. I
> could use perl just to format attributes to desired form (escaping,
> double quoting, config file which define necessary attribute /
> ordering) and then pass generated line to linelog. The idea is to let
> the linelog handle file writes and keep my perl module as simple as it
> could be.
> 
> Any thoughts?

linelog is a heck of a lot faster than perl. If you want to do
this in production, I'd definitely do some speed benchmarks first.

Personally I'd either just write it out with linelog and then,
like Alan said before, post-process if you really can't stand
',"",' in the files, or write a new xlat in rlm_expr to quote a
non-null string and use that for all the attributes.

Some variant on linelog specifically for generating CSV/TSV files
might be worthwhile, but pretty much everyone's got along with
linelog just fine so far, so it doesn't seem to be worth the time
to write one.

Matthew


-- 
Matthew Newton, Ph.D. <mcn4 at leicester.ac.uk>

Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>


More information about the Freeradius-Users mailing list