@logbun/node
v1.0.14
Published
Node.js integration for Logbun
Downloads
21
Readme
Links
Usage
To integrate the Logbun SDK into your project, follow these steps:
Install the Logbun SDK using npm:
npm install @logbun/node
Import Logbun in your JavaScript file:
import Logbun from '@logbun/node';
Initialize Logbun by calling
Logbun.init(options)
as early as possible after loading the page. This initializes the SDK and hooks into the environment.Logbun.init({ apiKey: '{{API_KEY}}', // ... other options });
Manual Events
You can manually send events using the notify
function provided by @logbun/node
. Note that these functions will not perform any action until you have called Logbun.init()
:
import Logbun from '@logbun/node';
// Capture exceptions, messages, or manual events
Logbun.notify('Rick');
Logbun.notify(new Error('Roll'));
Make sure to replace {{API_KEY}}
with your actual Logbun API key.
For more details on configuration options and additional features, refer to the official documentation.