Skip to content

Commit 53c0b83

Browse files
committed
Change default log level to INFO
The defualt log level was previously set to WARN, meaning INFO-level logging and above would not be output. This was confusing, as INFO statements were intended to be used to convey basic, helpful information. To that end, the default level has been dropped down to INFO. This also required updating log.info statements that were outputting DEBUG-style information to be similarly adjusted to log.debug statements.
1 parent 28759bc commit 53c0b83

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

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

Lines changed: 2 additions & 2 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 ? WARN : DEBUG;
47+
private int currentLevel = System.getenv("DEBUG") == null ? INFO : DEBUG;
4848

4949
private Map<String, Integer> classAndPackageLevels =
5050
new HashMap<String, Integer>();
@@ -77,7 +77,7 @@ public AbstractLogService() {
7777

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

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

src/main/java/org/scijava/platform/DefaultPlatformService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public void initialize() {
164164
log.debug("Configuring platform: " + platform.getClass().getName());
165165
platform.configure(this);
166166
}
167-
if (platforms.size() == 0) log.info("No platforms to configure.");
167+
if (platforms.size() == 0) log.debug("No platforms to configure.");
168168
}
169169

170170
// -- Disposable methods --

src/main/java/org/scijava/plugin/AbstractSingletonService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private synchronized void initInstances() {
125125
map.put(ptClass, plugin);
126126
}
127127

128-
log.info("Found " + list.size() + " " + getPluginType().getSimpleName() +
128+
log.debug("Found " + list.size() + " " + getPluginType().getSimpleName() +
129129
" plugins.");
130130

131131
instanceMap = map;

src/main/java/org/scijava/plugin/AbstractWrapperService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public <D extends DT> PT create(final D data) {
6464
@Override
6565
public void initialize() {
6666
if (log != null) {
67-
log.info("Found " + getPlugins().size() + " " +
67+
log.debug("Found " + getPlugins().size() + " " +
6868
getPluginType().getSimpleName() + " plugins.");
6969
}
7070
}

src/main/java/org/scijava/plugin/DefaultPluginService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public <PT extends SciJavaPlugin> List<PT> createInstances(
249249
public void initialize() {
250250
pluginIndex = context().getPluginIndex();
251251

252-
log.info("Found " + pluginIndex.size() + " plugins.");
252+
log.debug("Found " + pluginIndex.size() + " plugins.");
253253
if (log.isDebug()) {
254254
for (final PluginInfo<?> info : pluginIndex) {
255255
log.debug("- " + info);

src/main/java/org/scijava/script/ScriptFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void findScripts(final List<ScriptInfo> scripts) {
9494
discoverScripts(scripts, scriptFiles, directory, menuPath);
9595
}
9696

97-
log.info("Found " + scriptCount + " scripts");
97+
log.debug("Found " + scriptCount + " scripts");
9898
}
9999

100100
// -- Helper methods --

src/main/java/org/scijava/ui/DefaultUIService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public void showUI(final String name) {
176176

177177
@Override
178178
public void showUI(final UserInterface ui) {
179-
log.info("Launching user interface: " + ui.getClass().getName());
179+
log.debug("Launching user interface: " + ui.getClass().getName());
180180
ui.show();
181181
// NB: Also show all the current displays.
182182
for (final Display<?> display : displayService.getDisplays()) {
@@ -499,7 +499,7 @@ private synchronized void discoverUIs() {
499499
// instantiate user interface
500500
final UserInterface ui = pluginService.createInstance(info);
501501
if (ui == null) continue;
502-
log.info("Discovered user interface: " + ui.getClass().getName());
502+
log.debug("Discovered user interface: " + ui.getClass().getName());
503503
addUserInterface(info.getName(), ui);
504504
}
505505

0 commit comments

Comments
 (0)