const createLogger = require('@blocklet/logger');

interface Logger {
  debug: (...args: any[]) => void;
  info: (...args: any[]) => void;
  error: (...args: any[]) => void;
  warn: (...args: any[]) => void;
}

const init = (label: string): Logger => {
  const instance = createLogger(label || '');
  return instance;
};

const logger = init('app');

export default logger;

const { setupAccessLogger } = createLogger;
export { setupAccessLogger };
