# src/Logger.js

    /* eslint-disable no-console, consistent-return */

    const logger = (function Logger() {
      const prefix = "[RM]";
      const logLevelPreset = [
        'SILENT',
        'ERROR',
        'WARN',
        'INFO',
        'DEBUG',
        'VERBOSE',
      ];

      let level;

      function init(config) {
        if (!logLevelPreset.includes(config)) {
          throw new Error('Logger:UnmatchedLogLevel');
        }
        level = config;
      }

      function e(...message) {
        if (level === 'SILENT') {
          return;
        }

        return console.error(prefix+"E>", ...message);
      }

      function w(...message) {
        if (level === 'SILENT' || level === 'ERROR') {
          return;
        }

        return console.warn(prefix+"W>", ...message);
      }

      function g(...message) {
        if (level === 'SILENT' || level === 'ERROR' || level === 'WARN') {
          return;
        }

        return console.group(prefix+"G>", ...message);
      }

      function gEnd() {
        if (level === 'SILENT' || level === 'ERROR' || level === 'WARN') {
          return;
        }

        return console.groupEnd();
      }

      function l(...message) {
        if (level === 'SILENT' || level === 'ERROR' || level === 'WARN') {
          return;
        }
        return console.info(prefix+"I>", ...message);
      }

      function i(...message) {
        if (level === 'SILENT' || level === 'ERROR' || level === 'WARN') {
          return;
        }
        return console.info(prefix+"I>", ...message);
      }

      function d(...message) {
        if (level === 'SILENT' || level === 'ERROR' || level === 'WARN' || level === 'INFO') {
          return;
        }
        return console.debug(prefix+"I>", ...message);
      }

      function v(...message) {
        if (level === 'SILENT' || level === 'ERROR' || level === 'WARN' || level === 'INFO' || level === 'DEBUG') {
          return;
        }
        return console.debug(prefix+"D>", ...message);
      }

      return Object.freeze({
        init,
        e,
        w,
        g,
        gEnd,
        l,
        i,
        d,
        v,
      });
    }());

    export default logger;