Fix log collection

This commit is contained in:
Margaux Clerc 2015-02-16 18:07:07 +01:00
parent 92ab3703ed
commit 33d4978f5f
2 changed files with 2 additions and 1 deletions

View file

@ -444,6 +444,7 @@ public class LinphoneManager implements LinphoneCoreListener {
//traces alway start with traces enable to not missed first initialization //traces alway start with traces enable to not missed first initialization
boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)); boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log));
LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name)); LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name));
LinphoneCoreFactory.instance().enableLogCollection(isDebugLogEnabled);
mLc = LinphoneCoreFactory.instance().createLinphoneCore(this, mLinphoneConfigFile, mLinphoneFactoryConfigFile, null, c); mLc = LinphoneCoreFactory.instance().createLinphoneCore(this, mLinphoneConfigFile, mLinphoneFactoryConfigFile, null, c);
@ -479,6 +480,7 @@ public class LinphoneManager implements LinphoneCoreListener {
private synchronized void initLiblinphone() throws LinphoneCoreException { private synchronized void initLiblinphone() throws LinphoneCoreException {
boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && mPrefs.isDebugEnabled(); boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && mPrefs.isDebugEnabled();
LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name)); LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name));
LinphoneCoreFactory.instance().enableLogCollection(isDebugLogEnabled);
PreferencesMigrator prefMigrator = new PreferencesMigrator(mServiceContext); PreferencesMigrator prefMigrator = new PreferencesMigrator(mServiceContext);
prefMigrator.migrateRemoteProvisioningUriIfNeeded(); prefMigrator.migrateRemoteProvisioningUriIfNeeded();

View file

@ -136,7 +136,6 @@ public final class LinphoneService extends Service {
mNotificationTitle = getString(R.string.service_name); mNotificationTitle = getString(R.string.service_name);
// Needed in order for the two next calls to succeed, libraries must have been loaded first // Needed in order for the two next calls to succeed, libraries must have been loaded first
LinphoneCoreFactory.instance();
LinphoneCoreFactory.instance().setLogCollectionPath(getFilesDir().getAbsolutePath()); LinphoneCoreFactory.instance().setLogCollectionPath(getFilesDir().getAbsolutePath());
LinphoneCoreFactory.instance().enableLogCollection(!(getResources().getBoolean(R.bool.disable_every_log))); LinphoneCoreFactory.instance().enableLogCollection(!(getResources().getBoolean(R.bool.disable_every_log)));