Log

Dispatch log messages to the web console if the browser supports it (preventing errors) and if the current website is in development mode.



__.log.enable()

Enable log messages, allowing them to appear in the web console. It's recommended to call this method directly from the web console. It is done by setting a new localStorage data, that puts your current website in development mode for one day.

__.log.enable();

__.log.disable()

Disable log messages in the web console.

__.log.disable();

__.log.info( message: string )

Outputs an informational message to the web console. In Firefox and Chrome, a small "i" icon is displayed next to these items in the web console's log.

__.log.info('who');

__.log.trace( object: object )

Outputs a stack trace to the web console.

__.log.trace('whatches');

__.log.warn( message: string )

Outputs a warning message to the web console. In Firefox and Chrome, a small "!" icon is displayed next to these items in the web console's log.

__.log.warn('the');

__.log.error( message: string )

Outputs an error message to the web console. In Firefox and Chrome, a small "X" icon is displayed next to these items in the web console's log.

__.log.error('watchmen');

__.log.group( name: string )

Starts a new inline group in the web console log. This indents all following output by an additional level, until __.log.ungroup() is called.

__.log.group('Allan Moore');

__.log.ungroup()

Exits the current inline group in the web console.

__.log.ungroup();

Based on Log module from our previous library.