Skip to content

Commit c70ffde

Browse files
committed
Always fall back to JDK logging
1 parent aabf259 commit c70ffde

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎api/src/main/java/org/ocpsoft/logging/Logger.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.ocpsoft.logging;
22

3+
import java.util.Arrays;
34
import java.util.Collections;
45
import java.util.List;
56

@@ -8,7 +9,6 @@
89
import org.ocpsoft.common.util.Iterators;
910
import org.ocpsoft.logging.spi.LogAdapterFactory;
1011

11-
1212
/**
1313
* Class to create log messages.
1414
*
@@ -251,7 +251,10 @@ private static LogAdapterFactory createAdapterFactory()
251251
List<LogAdapterFactory> factories = Iterators.asList(ServiceLoader.load(LogAdapterFactory.class));
252252
if (factories.isEmpty())
253253
{
254-
throw new IllegalStateException("Log logging implementations found!");
254+
/*
255+
* Always fall back to the JDK, even if our service loading mechanism is hosed for some reason.
256+
*/
257+
factories = Arrays.asList((LogAdapterFactory) new JDKLogAdapterFactory());
255258
}
256259

257260
/*

0 commit comments

Comments
 (0)