Subject: | Cannot create custom cspecs %t (with lower case 't') |
I have tried to implement a custom cspecs
Log::Log4perl::Layout::PatternLayout::add_global_cspec('t',
sub { is_loaded('threads') ? threads->tid : '' }
);
When I try to use it my program croaks with the message
Error: Please don't redefine built-in cspecs [cCdFHIlLmMnpPrRtTxX%] like you do for "cspec.t"
The documented placeholders defined in Log::Log4perl::Layout::PatternLayout do not mention the letter 't' (lowercase 't') and if I am looking at the code it seems to be mapped to the constant string 'N/A'. Why is the letter 't' blocked (cannot be redefined), if there is no meaningful implementation behind it?
Kind regards
Sven