insertMessage(message){
        if(!this.collection){
            return;
        }

        if(!this.log_count){
            this.log_count = this.collection.countDocuments();
        }

        if(typeof message.text === 'object'){
            message.text = this.cloneAndFilterObject(message.text);
        }

        this.collection.insertOne(message);
    }
/**
     * Insert a message into the collection
     * @param {LoggerMessage} message 
     */
Insert a message into the collection
@param {LoggerMessage} message
Insert a message into the collection @param { LoggerMessage } message
insertMessage(message){
        if(!this.collection){
            return;
        }
        if(!this.log_count){
            this.log_count = this.collection.countDocuments();
        }
        if(typeof message.text === 'object'){
            message.text = this.cloneAndFilterObject(message.text);
        }
        this.collection.insertOne(message);
    }
insertMessage ( message ) { if ( ! this . collection ) { return ; } if ( ! this . log_count ) { this . log_count = this . collection . countDocuments ( ) ; } if ( typeof message . text === 'object' ) { message . text = this . cloneAndFilterObject ( message . text ) ; } this . collection . insertOne ( message ) ; }
Insert a message into the collection
 @param {LoggerMessage} message
Insert a message into the collection @param { LoggerMessage } message