Getting started overview
Logs.to provides a cloud-based service for aggregating, searching, and analyzing application and infrastructure logs in real time. The getting started process focuses on establishing an account, securing API credentials, and sending initial log data to the platform for processing. This typically involves configuring an application or system to send structured log events via HTTP or a language-specific SDK to a Logs.to ingestion endpoint. Once logs are received, they become available for querying, tailing, and alerting within the Logs.to web interface.
The following table outlines the key steps to get started with Logs.to:
| Step | What to do | Where |
|---|---|---|
| 1. Account Creation | Sign up for a Logs.to account. | Logs.to homepage |
| 2. API Key Generation | Create an API key for authentication. | Logs.to Dashboard > Settings > API Keys |
| 3. Choose Integration | Select an SDK or direct HTTP POST. | Logs.to integration documentation |
| 4. Send First Log | Implement code or command to send a log entry. | Your application code or terminal |
| 5. Verify Ingestion | Check the Logs.to dashboard for incoming logs. | Logs.to Dashboard > Live Tail or Search |
Create an account and get keys
To begin using Logs.to, a user must first register for an account. This process initiates through the Logs.to homepage, where users can select a plan, including the free tier which offers 1GB/month of ingestion and 3-day retention. Account creation typically requires an email address and password, followed by email verification.
Upon successful account creation and login, users are directed to the Logs.to dashboard. Accessing the API keys is a critical step for authentication. Navigate to the 'Settings' section, usually found in the sidebar or user menu, and then select 'API Keys'. Here, users can generate a new API key. It is recommended to create a dedicated key for each application or service to enable granular access control and easier key rotation if needed. API keys are long, randomly generated strings that must be kept confidential, similar to a password, as they grant permission to ingest log data into your Logs.to account.
For security best practices, consider environment variables or secure configuration management systems to store API keys rather than hardcoding them directly into application source code. This approach helps prevent accidental exposure of credentials, a common security vulnerability as described in documentation for other API services like AWS access key best practices.
Your first request
After obtaining an API key, the next step is to send your first log entry to Logs.to. This can be accomplished using a direct HTTP POST request or one of the available SDKs (Go, JavaScript, Rust, Python). The choice depends on your application's technology stack and preference.
Using HTTP POST (cURL example)
For a direct HTTP POST, you will send a JSON payload to the Logs.to ingestion endpoint. The endpoint URL and required headers are detailed in the Logs.to API reference documentation. A common approach involves using cURL for testing:
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Logs-To-API-Key: YOUR_API_KEY" \
-d '{ "message": "Hello, Logs.to! This is my first log.", "level": "info", "timestamp": "2026-05-29T10:00:00Z", "service": "my-app" }' \
https://ingest.logs.to/v1/log
Replace YOUR_API_KEY with the key generated from your dashboard. The message, level, timestamp, and service fields are examples of structured log data. Logs.to recommends sending structured logs (JSON objects) for enhanced search and filtering capabilities.
Using the JavaScript SDK
If your application is built with JavaScript (Node.js or browser-based), the Logs.to JavaScript SDK simplifies log ingestion. First, install the SDK:
npm install @logs.to/sdk
Then, integrate it into your code:
const LogsTo = require('@logs.to/sdk');
const logger = new LogsTo({ apiKey: 'YOUR_API_KEY' });
logger.info('Hello from JavaScript SDK!', {
component: 'web-server',
requestId: 'abc-123'
});
// To ensure logs are sent before process exits in Node.js
// In a long-running application, this is typically handled by the SDK's internal buffer flushing.
// For a simple script, you might need to manually flush or wait.
setTimeout(() => {
console.log('Log sent.');
}, 1000);
This example demonstrates sending an informational log with additional contextual properties. The SDK handles the HTTP request details, including headers and payload formatting.
Using the Python SDK
For Python applications, install the SDK:
pip install logs.to-sdk
Then, send a log:
from logsto_sdk import LogsToHandler
import logging
# Initialize the logger
logger = logging.getLogger('my_app')
logger.setLevel(logging.INFO)
# Configure Logs.to handler
handler = LogsToHandler(api_key='YOUR_API_KEY')
logger.addHandler(handler)
# Send a log message
logger.info('Hello from Python SDK!', extra={'user_id': 42, 'transaction_id': 'xyz-789'})
# In a simple script, you might need to ensure the handler flushes before exit
handler.close()
The Python SDK integrates with the standard logging module, allowing for familiar log management patterns. The extra dictionary allows for sending additional structured data with each log entry.
Common next steps
Once you have successfully sent your first log entry and verified its ingestion in the Logs.to dashboard, several common next steps can enhance your log management strategy:
- Integrate with production applications: Deploy the chosen integration method (SDK or direct HTTP) across all your services and applications to centralize log collection.
- Configure log parsing: If you are sending unstructured logs or logs in a specific format, you might need to configure parsing rules within Logs.to to extract meaningful fields. This is less critical if you are already sending structured JSON logs.
- Set up alerts: Define alert conditions based on log patterns, error rates, or specific events. Logs.to allows you to configure notifications to various channels (e.g., email, Slack, PagerDuty) when these conditions are met. Details are available in the Logs.to alerting documentation.
- Create dashboards: Build custom dashboards to visualize key log metrics, such as error trends, request volumes, or specific event counts over time.
- Explore advanced search: Familiarize yourself with Logs.to's query language to perform complex searches, filter logs by specific fields, and analyze historical data.
- Review retention policies: Understand and adjust your log retention settings based on compliance requirements (e.g., GDPR data retention principles) and operational needs. Logs.to offers tiered retention options.
- Monitor usage: Keep an eye on your ingested data volume to manage costs, especially if you are on a usage-based plan. This information is typically available in your account settings or billing section.
Troubleshooting the first call
Encountering issues during your first log ingestion is common. Here are some troubleshooting steps:
- Check API Key: Ensure the API key used in your request is correct and has not expired or been revoked. Double-check for typos or leading/trailing spaces.
- Verify Endpoint URL: Confirm that the ingestion endpoint URL is accurate (e.g.,
https://ingest.logs.to/v1/log). Refer to the Logs.to API reference for the correct endpoint. - Content-Type Header: For HTTP POST requests, verify that the
Content-Type: application/jsonheader is correctly set. Incorrect headers can lead to parsing errors on the server side. - JSON Payload Validity: Ensure your log payload is valid JSON. Tools like online JSON validators can help identify syntax errors.
- Network Connectivity: Confirm that your application or environment has outbound network access to
ingest.logs.to. Firewall rules or proxy settings can sometimes block these connections. - SDK Specific Errors: If using an SDK, check the SDK's documentation for common error codes or logging output. SDKs often provide more detailed error messages than raw HTTP requests.
- Logs.to Dashboard: Even if a log isn't appearing, check the Logs.to dashboard for any error messages or partial ingestion data that might indicate a problem. Some platforms provide an 'ingestion errors' view.
- Rate Limiting: While unlikely for a first call, be aware that ingestion endpoints may have rate limits. If you're sending a large burst of logs immediately, this could be a factor.
- Consult Documentation: The Logs.to troubleshooting guide is the primary resource for specific error codes and solutions.