PatternLayout will follow the packaging data setting of the logger context. It will add %ex if packaging data is disabled and will add %xEx if packaging data is enabled for the context.