[RADIATOR] Store 'LogFormat' in varaible

Jan Bělina Jan.Belina at cesnet.cz
Thu Sep 14 09:11:11 UTC 2023


I have separate logfiles for 'Trace 3' and 'Trace 4' logs and some other 
for hooks only, for easy debuging.

Simple solution with %{GlobalVar:....}was first what i tried, but it 
seams that special formaters is not followed.

For example if i set:

DefineGlobalVar LogFormat [%Y-%m-%dT%H:%M:%S.%s] [%O] [%3] [%1] %2

And use it in <Log FILE> block, then all lines in log is like this:

[%Y-%m-%dT%H:%M:%S.%s] [%O] [%3] [%1] %2
[%Y-%m-%dT%H:%M:%S.%s] [%O] [%3] [%1] %2
[%Y-%m-%dT%H:%M:%S.%s] [%O] [%3] [%1] %2
[%Y-%m-%dT%H:%M:%S.%s] [%O] [%3] [%1] %2
[%Y-%m-%dT%H:%M:%S.%s] [%O] [%3] [%1] %2
...

So, this is not the right way for me :-)

Jan Belina


Dne 14. 09. 23 v 10:57 Hugh Irvine napsal(a):
>
> Hello Jan -
>
>
> LogFormat %{GlobalVar:....}
>
>
> But if they all have the same LogFormat, why not use an Identifier and 
> have just one <Log FILE>?
>
>
> regards
>
> Hugh
>
>
> On 14/9/2023 18:48, Jan Bělina via radiator wrote:
>>
>> Hi all,
>>
>> does anyone have an idea, how to store LogFormat in a variable? I 
>> have many <Log FILE> blocks with the same LogFormat clauses. It would 
>> be nice to use GlobalVar for it, but i dont know how to do it...
>>
>> Best regards,
>>
>> Jan Belina
>>
>>
>> _______________________________________________
>> radiator mailing list
>> radiator at lists.open.com.au
>> https://lists.open.com.au/mailman/listinfo/radiator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4301 bytes
Desc: Elektronicky podpis S/MIME
URL: <https://lists.open.com.au/pipermail/radiator/attachments/20230914/9f75c8ff/attachment.p7s>


More information about the radiator mailing list