
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ember-debug-logger
Advanced tools
ember-debug-logger
exposes the visionmedia/debug library for use in your Ember.js application.
ember install ember-debug-logger
The debug library is available for standard use by import:
import debug from 'debug';
const log = debug('demo-namespace');
log('Hello, world');
During development, you can enable logging for particular namespaces calling debug.enable
in the developer console. Your preferences will be persisted in local storage, but they're only checked when a logger is instantiated, so in most cases you'll need to refresh the page to see them take effect.
Enabled namespaces follow simple globbing rules, so to enable logging for everything, you could use:
debug.enable('*');
To enable only logging coming from the application route:
debug.enable('route:application');
You can mix and match as well. To enable logging for all routes and the foo-bar
service, for instance:
debug.enable('route:*, service:foo-bar');
You can turn off all logging with disable
:
debug.disable();
Namespaces will automatically be differentiated by color, and the time between messages will be logged.
This addon exports a debugLogger
function you can attach to a class definition. The resulting method will automatically use its instance's container key as the namespace.
// app/routes/index.js
import Route from '@ember/route';
import debugLogger from 'ember-debug-logger';
export default Route.extend({
debug: debugLogger();
activate() {
this.debug('Hello from the application index.');
}
});
v2.1.1 - 04/09/2019
This release fixes a bug introduced in v2.1.0
— debug@4
contains ES6 syntax that breaks compatibility with IE11. We now lock our debug
dependency below version 4.
FAQs
An Ember addon to expose the Visionmedia debug logger.
We found that ember-debug-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.