Sending Your First Log
Send your first log entry and verify it appears in the dashboard.
Install the SDK
Choose your platform and install:
Terminal
# Node.js
npm install @lognitor/node
# Python
pip install lognitor
# PHP
composer require lognitor/lognitorInitialize and Send
Node.js
JavaScript
import Lognitor from '@lognitor/node';
Lognitor.init({
apiKey: process.env.LOGNITOR_API_KEY,
service: 'my-app',
environment: 'production',
});
Lognitor.info('Hello from Lognitor!');Python
Python
import lognitor
lognitor.init(
api_key='your-api-key',
service='my-app',
environment='production',
)
lognitor.info('Hello from Lognitor!')PHP
PHP
use Lognitor\Lognitor;
Lognitor::init([
'api_key' => 'your-api-key',
'service' => 'my-app',
'environment' => 'production',
]);
Lognitor::info('Hello from Lognitor!');Verify in the Dashboard
Go to the dashboard. Within seconds, your log should appear on the Dashboard page and in the Logs viewer. If you don't see it:
- Check that your API key is correct.
- Ensure your application can reach the Lognitor API endpoint.
- Check the SDK's
debug: trueoption for diagnostic output.
Use Live Tail
Open Live Tail to watch logs arrive in real time as you send them.