Hamster
hamsterlog
Getting Started

Getting Started

Get up and running with Hamsterlog in just a few minutes. This guide will walk you through creating an account, getting your API key, and sending your first logs.

1. Create Your Account

Start by creating a free account:

  1. Visit the Sign Up Page
  2. Sign up with your email address
  3. You'll automatically be logged into your dashboard

🐹 Free Trial

Every account starts with a 7 day free trial. This allows you to play around with Hamsterlog and see if it's a good fit for your needs.

2. Get Your API Key

Once you're logged into your dashboard:

  1. Go to Settings (the gear icon in the bottom left corner) > Sources
  2. Copy the API key to use in your application
  3. Keep this key secure - treat it like a password

3. Choose Your Language or Runtime

Download the hamster-file (some would would call it a 'library' or 'SDK', but it's really just one tiny file 🐹) and follow the instructions for your preferred language or runtime:

4. Basic Concepts

Sources & API Keys

A 'source' could be an app, a website, a microservice, Docker-container, anything you want really. Your account can have multiple sources in your account. Each source has its own API key. Manage them in Dashboard > Settings > Sources.

Tags

Tags are labels you can attach to logs to categorize and filter them. Tags are optional, and can be any string you want. Examples:

  • ["error", "payment"] for payment-related errors
  • ["info", "user-signup"] for user registration events
  • ["debug", "database"] for database debugging

Log Levels

Hamsterlog by default supports three main log levels:

  • Log: General information and debugging
  • Warn: Warning messages (automatically tagged with "warning")
  • Error: Error messages (automatically tagged with "error")

5. Your First Log

Here's a quick example of what your code will look like (using Node.js):

import { Hamster } from "./hamster-node.js";

// Initialize
const hamster = new Hamster({
    apiKey: "your-api-key-here",
    defaultTags: ["my-app"],
});

// Send your first log!
hamster.log("Hello, Hamsterlog!", ["greeting"]);

💡 Good to know

By default, Hamsterlog (for Node.js, Deno and Bun) will automatically send all your existing console.log/warn/error/info/debug calls to Hamsterlog without you having to change your code!

If you want to disable this, you can set captureConsole: false when initializing Hamsterlog.

6. View Your Logs

Once you've sent your first logs:

  1. Go back to your Hamsterlog Dashboard
  2. You should see your logs appearing in real-time
  3. Use the filters to search by tags, date ranges, or text content

🆘 Need Help?

If you run into any issues, check our Troubleshooting guide.