How to use the loglevel.noConflict function in loglevel

To help you get started, we’ve selected a few loglevel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MyScript / MyScriptJS / src / configuration / LoggerConfig.js View on Github external
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');
github MyScript / myscript-math-web / docs / components / myscript / src / configuration / LoggerConfig.js View on Github external
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');
github zencrepes / zencrepes / imports / ui / services / models / global.js View on Github external
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() {
github MyScript / MyScriptJS / src / configuration / LoggerConfig.js View on Github external
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);