Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as log from 'loglevel';
const logger = log.noConflict();
logger.setDefaultLevel(log.levels.ERROR);
logger.setLevel(log.levels.ERROR); // TRACE,DEBUG,INFO,ERROR
/**
* Log editor events
* @type {Object}
*/
const editorLogger = logger.getLogger('editor');
editorLogger.setDefaultLevel(log.levels.ERROR); // TRACE,DEBUG,INFO,ERROR
editorLogger.setLevel(logger.getLevel());
/**
* Log model events
* @type {Object}
*/
const modelLogger = logger.getLogger('model');
import assign from 'assign-deep';
import * as loglevel from 'loglevel';
/**
* Main log instance
* @type {Object}
*/
const log = loglevel.noConflict();
export default log;
/**
* Log editor events
* @type {Object}
*/
export const editorLogger = log.getLogger('editor');
editorLogger.setDefaultLevel('ERROR');
/**
* Log model events
* @type {Object}
*/
export const modelLogger = log.getLogger('model');
modelLogger.setDefaultLevel('ERROR');
async initApp() {
const logger = log.noConflict();
if (process.env.NODE_ENV !== 'production') {
logger.enableAll();
} else {
logger.disableAll();
}
logger.info("Logger initialized");
this.setLog(logger);
if (Meteor.settings.public.menus !== undefined) {
this.setMenus(Meteor.settings.public.menus);
}
},
async checkData() {
import * as loglevel from 'loglevel';
import Constants from './Constants';
/**
* Main log instance
* @type {Object}
*/
const log = loglevel.noConflict();
export default log;
/**
* Log editor events
* @type {Object}
*/
export const editorLogger = log.getLogger(Constants.Logger.EDITOR);
editorLogger.setDefaultLevel(Constants.LogLevel.ERROR);
/**
* Log model events
* @type {Object}
*/
export const modelLogger = log.getLogger(Constants.Logger.MODEL);
modelLogger.setDefaultLevel(Constants.LogLevel.ERROR);