diff --git a/src/main/java/io/antmedia/settings/ServerSettings.java b/src/main/java/io/antmedia/settings/ServerSettings.java index b7bdbae36..9cbafe335 100755 --- a/src/main/java/io/antmedia/settings/ServerSettings.java +++ b/src/main/java/io/antmedia/settings/ServerSettings.java @@ -148,7 +148,7 @@ public class ServerSettings implements ApplicationContextAware { * Native Log Level is used for ffmpeg and WebRTC logs */ @Value( "${"+SETTINGS_NATIVE_LOG_LEVEL+":'ERROR'}" ) - private String nativeLogLevel = LOG_LEVEL_WARN; + private String nativeLogLevel = LOG_LEVEL_ERROR; /** * Enable heart beat for Ant Media Server @@ -394,7 +394,7 @@ else if (ILicenceService.LICENCE_TYPE_OFFLINE.equals(licenseService.getLicenseTy offlineLicense = true; } } - + setNativeLogLevel(nativeLogLevel); } diff --git a/src/test/java/io/antmedia/test/settings/ServerSettingsTest.java b/src/test/java/io/antmedia/test/settings/ServerSettingsTest.java index f0fb50b66..af8ce003a 100644 --- a/src/test/java/io/antmedia/test/settings/ServerSettingsTest.java +++ b/src/test/java/io/antmedia/test/settings/ServerSettingsTest.java @@ -29,10 +29,11 @@ public class ServerSettingsTest extends AbstractJUnit4SpringContextTests { @Test public void testNativeLogLevel() { + ServerSettings settings = new ServerSettings(); assertEquals(Logging.Severity.LS_WARNING, settings.getWebRTCLogLevel()); - assertEquals(ServerSettings.LOG_LEVEL_WARN, settings.getNativeLogLevel()); + assertEquals(ServerSettings.LOG_LEVEL_ERROR, settings.getNativeLogLevel()); settings.setNativeLogLevel(ServerSettings.LOG_LEVEL_ALL); assertEquals(Logging.Severity.LS_VERBOSE, settings.getWebRTCLogLevel()); @@ -89,6 +90,9 @@ public void testSetAppContext() assertEquals(ServerSettings.getLocalHostAddress(), settings.getHostAddress()); + String nativeLogLevel = settings.getNativeLogLevel(); + Mockito.verify(settings).setNativeLogLevel(nativeLogLevel); + Mockito.doReturn("").when(settings).getHostAddressFromEnvironment(); settings.setUseGlobalIp(true); @@ -114,9 +118,7 @@ public void testSetAppContext() settings.setApplicationContext(applicationContext); assertTrue(settings.isOfflineLicense()); - - - + } @Test