> For the complete documentation index, see [llms.txt](https://abyss-project.gitbook.io/abyss-monitor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abyss-project.gitbook.io/abyss-monitor/setup/logger.md).

# Logger

The NPM package provide an easy to use Logger system.

{% hint style="info" %}
To use the Logger, you have to [setup the core](/abyss-monitor/setup/core.md#using-the-npm-core-package) before.
{% endhint %}

### Publish Logs with CORE

Using the core, you can easily setup up multiple logger for each part of you application and publish every essential information to the Dashboard.

{% code overflow="wrap" lineNumbers="true" %}

```typescript
const logger = new Logger({
    shouldDisableRemoteLogging: false, // Can be set to true on local development env
});

// By calling this method, you will automatically send a log in the console and publish it to the Abyss Monitor Dashboard
logger.log('This is my first log');
logger.error('This is my first error log');
logger.warn('This is my first warn log');
logger.info('This is my first info log');

// Debug is similar to log but it's automatically save the stack trace
logger.debug('This is my first debug log');

// Advanced log
logger.error(error, {
      context: "Mon Context",
      scenario: "My Scenario",
      // getRequestContext is an easy to use tool to get the current RequestId of your API
      // Please check the Express Middleware setup before using it
      requestId: getRequestContext().requestId,
});
```

{% endcode %}

{% hint style="info" %}
The `Logger` allow multiple options, please check package to get the complete list.
{% endhint %}
