Function setDefaultLogging

  • Sets the global, default log level and destination. The default log settings are used for all new client instances, unless different log settings are supplied in the client's configuration.

    The global log settings are also used to control the logging of the Aerospike C client SDK which is included in the aerospike native add-on. The C client SDK log settings are global and cannot be set separately per Client instance.

    Parameters

    Returns void

    v3.1.0

    const Aerospike = require('aerospike')

    // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!
    var config = {
    hosts: '192.168.33.10:3000',
    }

    Aerospike.setDefaultLogging({
    level: Aerospike.log.TRACE
    })

    Aerospike.connect(config, (error, client) => {
    if (error) {
    console.error('Failed to connect to cluster: %s', error.message)
    process.exit()
    } else {
    // client is ready to accept commands
    console.log("Connected. Now closing connection.")
    client.close()
    }
    })
MMNEPVFCICPMFPCPTTAAATR