Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 506401 of console/plain-text

  • Revision slug: Mozilla/Add-ons/SDK/Low-Level_APIs/console_plain-text
  • Revision title: console/plain-text
  • Revision id: 506401
  • Created:
  • Creator: jsantell
  • Is current revision? No
  • Comment

Revision Content

Unstable

The console/plain-text module exposes a constructor for a console instance.

Usage

The plain-text console is a constructor for creating a console object to be used for traditional logging purposes. It's implemented using Console.jsm, and is prefixed with the addon's name, and log levels set based off of startup instruction. An instance of the console is injected globally into addon's contexts.

Globals

Constructors

PlainTextConsole(print)

Creates a console instance. All of its methods are inherited from Console.jsm (resource://gre/modules/devtools/Console.jsm).

Parameters

print : Function
An optional function to process the arguments passed in before printing to stdout.

Revision Source

<div class="note">
 <p>Unstable</p>
</div>
<p><span class="seoSummary">The <code>console/plain-text</code> module exposes a constructor for a console instance.</span></p>
<h2 id="Usage">Usage</h2>
<p>The plain-text console is a constructor for creating a console object to be used for traditional logging purposes. It's implemented using Console.jsm, and is prefixed with the addon's name, and log levels set based off of startup instruction. An instance of the console is injected globally into addon's contexts.</p>
<h2 id="Globals">Globals</h2>
<h3 id="Constructors">Constructors</h3>
<h4 class="addon-sdk-api-name" id="PlainTextConsole(print)"><code>PlainTextConsole(print)</code></h4>
<p>Creates a console instance. All of its methods are inherited from Console.jsm (resource://gre/modules/devtools/Console.jsm).</p>
<h5 id="Parameters">Parameters</h5>
<p><strong>print : Function</strong><br />
 An optional function to process the arguments passed in before printing to stdout.</p>
Revert to this revision