function logAtLevel_(message, level) {
  if (message != null) {
    var messageDiv = $('<div></div>');
    messageDiv.addClass(level);
    if (typeof message === 'object') {
      messageDiv.text(JSON.stringify(message, null, '  '));
    } else {
      messageDiv.text(message);
    }
    $('.logs').append(messageDiv);
  }
  console[level](message);
}
function logAtLevel_(message, level) {
  if (message != null) {
    var messageDiv = $('<div></div>');
    messageDiv.addClass(level);
    if (typeof message === 'object') {
      messageDiv.text(JSON.stringify(message, null, '  '));
    } else {
      messageDiv.text(message);
    }
    $('.logs').append(messageDiv);
  }
  console[level](message);
}
function logAtLevel_ ( message , level ) { if ( message != null ) { var messageDiv = $ ( '<div></div>' ) ; messageDiv . addClass ( level ) ; if ( typeof message === 'object' ) { messageDiv . text ( JSON . stringify ( message , null , '  ' ) ) ; } else { messageDiv . text ( message ) ; } $ ( '.logs' ) . append ( messageDiv ) ; } console [ level ] ( message ) ; }
Logs the message in the console and on the log window in the app
using the level given.
@param {?Object} message Object or message to log.
@param {string} level The level of log (log, error, debug).
@private
Logs the message in the console and on the log window in the app using the level given .
Log at level