Skip to content

Commit c342a35

Browse files
committed
Change the default log level to WARN
Several people have told me that SciJava applications currently produce too much logging by default, and I agree. In particular, PTServices tend to emit the number of plugins of various types that were discovered. I think this sort of information _does_ make sense at the "INFO" level, and that the default level should rather be WARN instead.
1 parent b371fd3 commit c342a35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/scijava/log/AbstractLogService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
*/
4545
public abstract class AbstractLogService extends AbstractService implements LogService {
4646

47-
private int currentLevel = System.getenv("DEBUG") == null ? INFO : DEBUG;
47+
private int currentLevel = System.getenv("DEBUG") == null ? WARN : DEBUG;
4848

4949
private Map<String, Integer> classAndPackageLevels =
5050
new HashMap<String, Integer>();
@@ -76,8 +76,8 @@ public AbstractLogService() {
7676
if (level >= 0) setLevel(level);
7777

7878
if (getLevel() == 0) {
79-
// use the default, which is INFO unless the DEBUG env. variable is set
80-
setLevel(System.getenv("DEBUG") == null ? INFO : DEBUG);
79+
// use the default, which is WARN unless the DEBUG env. variable is set
80+
setLevel(System.getenv("DEBUG") == null ? WARN : DEBUG);
8181
}
8282

8383
// populate custom class- and package-specific log level properties

0 commit comments

Comments
 (0)