src/logmatic.js
function(message) {
    if (!_.isObject(message)) {
      message = {
        message: message
      };
    }

    try {
      message = JSON.stringify(_.defaultsDeep({}, message, this.config.defaultProps));
    } catch (e) {
      return this.logger.error('Logmatic - error while parsing log message. Not sending', e);
    }

    if (this.isConnected) {
      this.sendMessage(message);
    } else {
      this.messageBuffer.push(message);
    }
  }
function(message) {
    if (!_.isObject(message)) {
      message = {
        message: message
      };
    }

    try {
      message = JSON.stringify(_.defaultsDeep({}, message, this.config.defaultProps));
    } catch (e) {
      return this.logger.error('Logmatic - error while parsing log message. Not sending', e);
    }

    if (this.isConnected) {
      this.sendMessage(message);
    } else {
      this.messageBuffer.push(message);
    }
  }
function ( message ) { if ( ! _ . isObject ( message ) ) { message = { message : message } ; } try { message = JSON . stringify ( _ . defaultsDeep ( { } , message , this . config . defaultProps ) ) ; } catch ( e ) { return this . logger . error ( 'Logmatic - error while parsing log message. Not sending' , e ) ; } if ( this . isConnected ) { this . sendMessage ( message ) ; } else { this . messageBuffer . push ( message ) ; } }
Send log message

@param  {object|any} message
Send log message