If one of many layouts is configured that has a locale-relevant attribute like HTML locationInfo, or among the list of styles %C or %course, %File or %file, %l or %location, %L or %line, %M or %technique, Log4j will have a snapshot with the stack, and walk the stack trace to discover The situation information and facts. This really is an expensive