Reports logging calls with non-constant arguments which are not surrounded by a guard condition. The evaluation of the arguments of a logging call can be expensive. Surrounding a logging call with a guard clause prevents that cost, when the logging is disabled for the level used by the logging statement. This is especially useful for the least serious level (trace, debug, finest) of logging calls, because those are most often disabled in a production environment.

Use the text field below to specify the logger class name used.

Use the table to specify the logging methods this inspection should warn on, with the corresponding log condition text.

Use the checkbox below to let this inspection flag all unguarded log calls, not only those with non-constant arguments.