ember / 2 / classes / ember.logger / methods.html

Class Ember.Logger

public

assert (bool, message) public

bool
Boolean
Value to test
message
String
Assertion message on failed

If the value passed into Ember.Logger.assert is not truthy it will throw an error with a stack trace.

 Ember.Logger.assert(true); // undefined
 Ember.Logger.assert(true === false); // Throws an Assertion failed error.
 Ember.Logger.assert(true === false, 'Something invalid'); // Throws an Assertion failed error with message.

debug (arguments) public

arguments
*

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.

 var foo = 1;
 Ember.Logger.debug('log value of foo:', foo);
 // "log value of foo: 1" will be printed to the console

error (arguments) public

arguments
*

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.

 Ember.Logger.error('Danger! Danger!');
 // "Danger! Danger!" will be printed to the console in red text.

info (arguments) public

arguments
*

Logs the arguments to the console. You can pass as many arguments as you want and they will be joined together with a space.

 var foo = 1;
 Ember.Logger.info('log value of foo:', foo);
 // "log value of foo: 1" will be printed to the console

log (arguments) public

arguments
*

Logs the arguments to the console. You can pass as many arguments as you want and they will be joined together with a space.

 var foo = 1;
 Ember.Logger.log('log value of foo:', foo);
 // "log value of foo: 1" will be printed to the console

warn (arguments) public

arguments
*

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.

 Ember.Logger.warn('Something happened!');
 // "Something happened!" will be printed to the console with a warning icon.

© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/classes/Ember.Logger/methods