/* global
  Logger: false,
  UALog: true
*/
'use strict';


// ------------------------------------
//  Create the logger for this package
// ------------------------------------
UALog = new Logger('useraccounts:oauth');

UALog.trace('Initializing logger options');


// ----------------------------------
//  Pick up settings for this logger
// ----------------------------------

var uaLogLevelSettings;
if (
  Meteor.settings &&
  Meteor.settings.public &&
  Meteor.settings.public.useraccounts
) {
  uaLogLevelSettings = Meteor.settings.public.useraccounts.logLevel;
} else if (Meteor.settings && Meteor.settings && Meteor.settings.useraccounts) {
  uaLogLevelSettings = Meteor.settings.useraccounts.logLevel;
}

if (uaLogLevelSettings && uaLogLevelSettings.core) {
  Logger.setLevel('useraccounts:oauth', uaLogLevelSettings.oauth);
}

if (Meteor.isServer && process.env.USERACCOUNTS_CORE_LOGLEVEL) {
  Logger.setLevel('useraccounts:oauth', process.env.USERACCOUNTS_CORE_LOGLEVEL);
}

@@ -33,17 +33,40 @@
 og: true
+,%0A  UserAccounts: false
 %0A
-
 */%0A'use 
@@ -241,771 +241,37 @@
 ');%0A
-%0AUALog.trace('Initializing logger options');%0A%0A%0A// ----------------------------------%0A//  Pick up settings for this logger%0A// ----------------------------------%0A%0Avar uaLogLevelSettings;%0Aif (%0A  Meteor.settings &&%0A  Meteor.settings.public &&%0A  Meteor.settings.public.useraccounts%0A) %7B%0A  uaLogLevelSettings = Meteor.settings.public.useraccounts.logLevel;%0A%7D else if (Meteor.settings && Meteor.settings && Meteor.settings.useraccounts) %7B%0A  uaLogLevelSettings = Meteor.settings.useraccounts.logLevel;%0A%7D%0A%0Aif (uaLogLevelSettings && uaLogLevelSettings.core) %7B%0A  Logger.setLevel('useraccounts:oauth', uaLogLevelSettings.oauth);%0A%7D%0A%0Aif (Meteor.isServer && process.env.USERACCOUNTS_CORE_LOGLEVEL) %7B%0A  Logger.setLevel('useraccounts:oauth', process.env.USERACCOUNTS_CORE_LOGLEVEL
+UserAccounts.setLogLevel(UALog
 );%0A
-%7D%0A

use setLogLevel to initialize logger