Function createModuleLogger

  • Creates a logger via the debug library which is derived from the logger for the whole project whose log messages will be tagged using the name of your module. By default, such messages will be suppressed, but you can reveal them by setting the DEBUG environment variable to metamask:<projectName>:<moduleName>. You can also set this variable to metamask:<projectName>:* if you want to see log messages from the project, or metamask:* if you want to see log messages from all MetaMask projects.

    Returns

    An instance of debug.

    Parameters

    • projectLogger: Debugger

      The logger created via createProjectLogger.

    • moduleName: string

      The name of your module. You could use the name of the file where you're using this logger or some other name.

    Returns Debugger