Ember.Logger Class packages/ember-metal/lib/logger.js:50
PUBLIC
Defined in: packages/ember-metal/lib/logger.js:50
Module: ember
Inside Ember-Metal, simply uses the methods from imports.console
.
Override this to provide more robust logging functionality.
assert
(bool)
public
If the value passed into Ember.Logger.assert
is not truthy it will throw an error with a stack trace.
1 2 |
Ember.Logger.assert(true); // undefined Ember.Logger.assert(true === false); // Throws an Assertion failed error. |
Parameters:
- bool Boolean
- Value to test
debug
(arguments)
public
Logs the arguments to the console in blue text. You can pass as many arguments as you want and they will be joined together with a space.
1 2 3 |
var foo = 1; Ember.Logger.debug('log value of foo:', foo); // "log value of foo: 1" will be printed to the console |
Parameters:
- arguments *
error
(arguments)
public
Prints the arguments to the console with an error icon, red text and a stack trace. You can pass as many arguments as you want and they will be joined together with a space.
1 2 |
Ember.Logger.error('Danger! Danger!'); // "Danger! Danger!" will be printed to the console in red text. |
Parameters:
- arguments *
info
(arguments)
public
Logs the arguments to the console. You can pass as many arguments as you want and they will be joined together with a space.
1 2 3 |
var foo = 1; Ember.Logger.info('log value of foo:', foo); // "log value of foo: 1" will be printed to the console |
Parameters:
- arguments *
log
(arguments)
public
Logs the arguments to the console. You can pass as many arguments as you want and they will be joined together with a space.
1 2 3 |
var foo = 1; Ember.Logger.log('log value of foo:', foo); // "log value of foo: 1" will be printed to the console |
Parameters:
- arguments *
warn
(arguments)
public
Prints the arguments to the console with a warning icon. You can pass as many arguments as you want and they will be joined together with a space.
1 2 |
Ember.Logger.warn('Something happened!'); // "Something happened!" will be printed to the console with a warning icon. |
Parameters:
- arguments *