How to use the @firebase/logger.LogLevel.VERBOSE function in @firebase/logger

To help you get started, we’ve selected a few @firebase/logger 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 firebase / firebase-js-sdk / packages / database / src / core / util / util.ts View on Github external
export const enableLogging = function(
  logger_?: boolean | ((a: string) => void) | null,
  persistent?: boolean
) {
  assert(
    !persistent || logger_ === true || logger_ === false,
    "Can't turn on custom loggers persistently."
  );
  if (logger_ === true) {
    logClient.logLevel = LogLevel.VERBOSE;
    logger = logClient.log.bind(logClient);
    if (persistent) {
      SessionStorage.set('logging_enabled', true);
    }
  } else if (typeof logger_ === 'function') {
    logger = logger_;
  } else {
    logger = null;
    SessionStorage.remove('logging_enabled');
  }
};

@firebase/logger

A logger package for use in the Firebase JS SDK

Apache-2.0
Latest version published 14 days ago

Package Health Score

95 / 100
Full package analysis

Similar packages