const logger = {
  info: (message: string) => {
    // tslint:disable-next-line:no-console
    // tslint:disable-next-line:strict-type-predicates
    if (console && typeof console.info === 'function') {
      // tslint:disable-next-line:no-console
      console.info(`Canvasimo: ${message}`);
    }
  },
  warn: (message: string) => {
    // tslint:disable-next-line:no-console
    // tslint:disable-next-line:strict-type-predicates
    if (console && typeof console.warn === 'function') {
      // tslint:disable-next-line:no-console
      console.warn(`Canvasimo: ${message}`);
    }
  },
};

export default logger;

const consoleExists = Boolean(window.console);

const logger = {
  info: (message: string) => {
    if (consoleExists) {
      window.console.info(`Canvasimo: ${message}`);
    }
  },
  warn: (message: string) => {
    if (consoleExists) {
      window.console.warn(`Canvasimo: ${message}`);
    }
  },
};

export default logger;

Check for window.console and use this for logs
Check for window.console and use this for logs
