Skip to main content

How to Set Up Log Monitoring in 10 Minutes

Published 2026-01-20 · Updated 2026-03-01

>_ why most developers skip log monitoring (and regret it)

Every developer has had the experience: a user reports a bug you cannot reproduce, or your app silently fails in production and you have no idea what happened. The fix is obvious — set up log monitoring so you can see what your application is doing in production. But most developers put it off because they imagine a multi-day setup process involving agents, configuration files, and dashboard creation. The reality is that modern log monitoring tools have reduced setup to minutes, not days. In this guide, we will set up LogMonitor from scratch. By the end, you will have real-time production logs streaming to a searchable console. The whole process takes under 10 minutes, and most of that time is reading this article.

>_ step 1: create your logmonitor account

Head to app.logmonitor.io and create an account. You will be asked to create your first app — give it a name that matches your project. Once your app is created, you will see your API key on the dashboard. Copy this key — you will need it in the next step. LogMonitor's Starter plan at $9 per month gives you 2 apps with 50,000 logs per month and 7-day retention. For this tutorial, that is more than enough. If you are following along with a production app that generates more logs, the Pro plan at $19 per month covers 1 million logs with 30-day retention.

>_ step 2: install the sdk (javascript)

For JavaScript and React applications, install the LogMonitor SDK from npm. The package is lightweight and has zero dependencies, so it will not bloat your bundle size. Run the following command in your project directory to install the SDK.
terminal · bash
npm install logmonitor-js

>_ step 3: initialize logmonitor (javascript)

Add the initialization code to your application's entry point. For React apps, this is typically your index.js or App.js file. For Node.js applications, add it at the top of your main file. The init function takes your API key. Once initialized, the SDK auto-patches console.log, console.info, console.warn, console.error, and console.debug, streaming them to your dashboard. Note that logs are only sent in production.
src/index.js · javascript
import { logmonitor } from 'logmonitor-js';
// Initialize LogMonitor with your API key
logmonitor.init({ apiKey: 'your-api-key' });
// The SDK auto-patches console.log, console.info, console.warn, console.error, and console.debug.
// Logs are only sent in production.
console.log('App started successfully');
console.warn('Cache miss for user preferences');
console.error('Failed to load user profile', { userId: '12345' });

>_ step 4: install and initialize (flutter)

For Flutter applications, add the LogMonitor package from pub.dev. The Flutter SDK is designed to have zero impact on your app's performance — it batches logs asynchronously and sends them in the background. Add the dependency to your pubspec.yaml and run flutter pub get. Then initialize LogMonitor in your main.dart file before runApp.
pubspec.yaml · yaml
dependencies:
  logmonitor_flutter: ^1.0.0
  logging: ^1.2.0

>_ step 5: initialize and use logmonitor in flutter

Once the package is installed, initialize LogMonitor in your main function. The Flutter SDK uses package:logging for log calls. All logs are batched and sent asynchronously, so there is no impact on your app's UI thread. Note that logs are only sent in release mode.
lib/main.dart · dart
import 'package:logmonitor_flutter/logmonitor_flutter.dart';
import 'package:logging/logging.dart';
final _log = Logger('MyApp');
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // Initialize LogMonitor
  await Logmonitor.init(apiKey: 'your-api-key');
  // Uses package:logging for log calls. Logs are only sent in release mode.
  _log.info('App initialized successfully');
  _log.warning('Slow network detected');
  _log.severe('Payment processing failed');
  runApp(const MyApp());
}

>_ step 6: using the http api (any platform)

If you are using a language or framework that does not have a native SDK, you can send logs directly to the LogMonitor HTTP API. The API accepts JSON payloads with your log data and returns a 202 Accepted response. This works from any language that can make HTTP requests — Python, Go, Ruby, PHP, Java, or anything else. The HTTP API endpoint accepts POST requests with your API key in the X-Logmonitor-Api-Key header and a JSON array body containing your log entries. Logs sent via the API appear in your LogMonitor console alongside logs from the SDKs.
terminal · bash
curl -X POST https://api.logmonitor.io/v1/logs \
  -H "X-Logmonitor-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{
    "level": "error",
    "message": "Database connection timeout",
    "app": "my-backend-api",
    "environment": "production",
    "data": {
      "host": "db-primary.internal",
      "timeout_ms": 5000
    }
  }]'
# Response: 202 Accepted

>_ step 7: verify your setup and use log switch

Go back to app.logmonitor.io and open your app's live console. You should see your logs appearing in real time. Try triggering different log levels in your application and watch them stream in. Use the search bar to filter logs by level, message content, or metadata fields. Once your basic logging is working, try the Log Switch feature. Navigate to your app settings and enable detailed logging for a specific user by their user ID. This is particularly useful for debugging issues that only affect specific users — you get verbose logs for that one user without flooding your console with logs from everyone else. Log Switch can be toggled on and off from the dashboard without any code changes or redeployments. Congratulations — you now have real-time production log monitoring. Your logs are searchable, filterable, and you can debug user-specific issues with Log Switch. The entire setup took less than 10 minutes, and your application's performance is unaffected thanks to the lightweight, asynchronous SDK.
  • $Check the live console at app.logmonitor.io
  • $Verify logs from different levels appear (log, warn, error)
  • $Try searching and filtering logs
  • $Enable Log Switch for a test user
  • $Alerting is on the roadmap but not yet available

>_ frequently asked questions

$ Will LogMonitor slow down my application?

No. The SDK is lightweight, asynchronous, and batches logs before sending. Log transmission happens in the background and does not block your application's main thread. The SDK has been tested under high load with zero measurable performance impact.

$ What happens if my app loses network connectivity?

The SDK buffers logs locally when the network is unavailable and sends them when connectivity is restored. No logs are lost during brief network interruptions.

$ Can I use LogMonitor in development and production?

Yes. Use the environment parameter to separate development and production logs. You can filter by environment in the LogMonitor console. Many teams use LogMonitor in development for debugging and in production for monitoring.

$ How do I avoid logging sensitive data?

Be intentional about what you log. Avoid logging passwords, tokens, credit card numbers, or personal identifiable information. LogMonitor does not automatically capture any data — it only sends what you explicitly log via the SDK or API.

>_ related pages

>_ about logmonitor

LogMonitor.io is a log observability platform built for developers who want simple, fast, affordable log monitoring without enterprise complexity. Stream production logs from your users' devices in real-time with native Flutter and React SDKs. Set up in under 5 minutes, with plans starting at $9/month. No dashboards to configure, no query languages to learn — just your logs, live.

logmonitor --start
Ready to see your production logs in real-time?
Start Monitoring →

Plans from $9/mo · Set up in under 5 minutes