log module

class Log()

Shorthand for accessing the Marionette logging repository.

Using this class to retrieve the Log.jsm repository for Marionette will ensure the logger is set up correctly with the appropriate stdout dumper and with the correct log level.

Unlike Log.jsm this logger is E10s safe, meaning repository configuration is communicated across processes.


Obtain the Marionette logger.

The returned {@link Logger} instance is shared among all callers in the same process.




Obtain a logger that logs all messages with a prefix.

Unlike {@link LoggerRepository.getLoggerWithMessagePrefix()} this function will ensure invoke {@link #get()} first to ensure the logger has been properly set up.

This returns a new object with a prototype chain that chains up the original {@link Logger} instance. The new prototype has log functions that prefix prefix to each message.

  • prefix (string) – String to prefix each logged message with.