Search squid archive

logformat: override %tg, but keep subsecond resolution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to override the %tg log format but keep its subsecond time
resolution.

As a reminder, %tg gives you this:

22/Apr/2020:14:14:18.360

I would like it to be

2020-04-22 14:14:18.360 +0000

I tried this first: %tg{%F %H:%M:%S %z}

That gave me 2020-04-22 14:14:18 +0000, so it's just missing the
milliseconds. And this is where I couldn't figure it out anymore.

Some combinations I tried, ranging from thoughtful experiments to just
random attempts:
%tg{%F %H:%M:%S %z}.%03tu -> 2020-04-22 14:14:18 +0000.360
%tg{%F %H:%M:%S.%03f %z} -> 2020-04-22 14:14:18.%03f +0000
%tg{%F %H:%M:%S.%03tu %z} -> ??? 2020-04-22 14:14:18.00  u +0000

What's the right format string I should use? I also checked
strftime(3) but couldn't figure it out.

Thanks!
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux