Did you do some profiling that showed those calls were a target for optimization? If not, then I would suggest running tests with and without those options. You might find they aren't a problem. On the other hand if you find that line number is useful information, that suggests you are doing a large amount of logging.
If they are a problem, though, my guess would be that they are the best possible way of producing that information. The supporting documentation for log4j does discuss the possible performance impacts of logging, so it seems unlikely to me that the people who wrote it deliberately implemented those features in a suboptimal way.