Hello Jan -
You could also try this:
DefineFormattedGlobalVar LogFormatDefinition
[%%Y-%%m-%%dT%%H:%%M:%%S.%%s] [%%O] [%%3] [%%1] %%2
The first % character is used to escape the second one.
Let me know if it works - I haven't tested it.
regards
Hugh
On 14/9/2023 22:41, Jan Bělina
Hello Jan -
H - yes I see.
Well, you can always use a single hook defined in a file I suppose.
.
LogFormatHook file:"%D/yourformat.pl"
.
regards
Hugh
On 14/9/2023 22:41, Jan Bělina wrote:
In that variant, special formaters are translated at compile time and
In that variant, special formaters are translated at compile time and
every line in log looks like this:
[2023-09-14T14:37:23.628949] [0] [] []
[2023-09-14T14:37:23.628949] [0] [] []
[2023-09-14T14:37:23.628949] [0] [] []
[2023-09-14T14:37:23.628949] [0] [] []
...
It looks like simple thing,
Of course that should be:
.
LogFormat %{GlobalVar:LogFormatDefinition}
.
On 14/9/2023 20:54, Hugh Irvine wrote:
Hello Jan -
Try this instead:
DefineFormattedGlobalVar LogFormatDefinition [%Y-%m-%dT%H:%M:%S.%s]
[%O] [%3] [%1] %2
Then in your LogFile:
Hello Jan -
Try this instead:
DefineFormattedGlobalVar LogFormatDefinition [%Y-%m-%dT%H:%M:%S.%s] [%O]
[%3] [%1] %2
Then in your LogFile:
.
LogFormat %{LogFormatDefinition}
.
Please let us know your results.
regards
Hugh
On 14/9/2023 19:11, Jan Bělina wrote:
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
Hello Jan -
LogFormat %{GlobalVar:}
But if they all have the same LogFormat, why not use an Identifier and
have just one ?
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
Hi all,
does anyone have an idea, how to store LogFormat in a variable? I have
many 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
smime.p7s
Description: Elektronicky podpis S/MIME