---
title: "Logging"
description: "Configure and update logging in the Aerospike Node.js client, including verbosity levels and custom log files."
---

# Logging

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

The Aerospike Node.js client has internal logging. Use the `Log` object to control the application log verbosity level and specify the location for storing log messages. By default, `Log` is set to `INFO` to send its log messages to stderr.

Log verbosity levels are defined in _aerospike.log_:

-   `OFF`
-   `ERROR`
-   `INFO` (default)
-   `DEBUG`
-   `DETAIL`

## Configure Logging

Configure client logging when setting system configuration. In the client configuration object, specify a `log` field to contain the following objects:

-   `level` — The log verbosity level.
-   `file` — The path to the log file.

This is an example configuration with defined log settings:

```js
const Aerospike = await import("aerospike");

// Set hosts to your server's address and port

const config = {

  hosts: "YOUR_HOST_ADDRESS:YOUR_PORT",

  log: {

    level: aerospike.log.INFO,

    file: "/var/log/myapplication.log",

  },

};

// Establishes a connection to the server

const client = await Aerospike.connect(config);
```

## Update Logging

Modify client logging during run time by using `client.updateLogging()`, which takes an object.

To reset the log level while the application is running:

```js
client.updateLogging({

  level: aerospike.log.TRACE,

  file: "/var/log/new_location.log",

});
```