★ Founding developer program: Pro free for 90 days for the first 50 developers →
DocsErrors & logs

Errors & logs

Every exception your plugin or mod throws on any server, grouped into issues, and your log lines from all of them in one searchable place.

Updated · by Skilled

Errors, automatically

The SDK listens to both logging systems servers use (java.util.logging and log4j). Any logged exception whose stack trace, or the stack trace of one of its causes, goes through your plugin's package is captured: errors in your commands, listeners and tasks, and anything you log with an exception attached.

The same exception reaching both logging systems is counted once.

Grouping

Errors are grouped by the type of the root cause and the first 5 methods of your code in its stack trace (class and method, without line numbers, so a small edit doesn't split an issue). The same bug on a thousand servers is one issue, with its count, the versions where it was first and last seen, and a stack trace.

Installs affected

Each issue also shows how many installs hit it in the selected period, counting each server once however many times it repeats the error, and what share of the active installs that is. One server throwing the same error thousands of times stays one install. Open an issue to see it per plugin version: the installs on each version that hit it, against all installs running that version, so you can tell whether a release introduced a widespread problem.

Redaction

Before anything is sent, messages and stack traces are cleaned: IP addresses (IPv4 with their port, and IPv6) become <ip>, UUIDs <uuid>, e-mail addresses <email>, credentials in URLs and values after password=, token=, secret= or api_key= are removed, user names in home-folder paths become <user>, and the names of online players (3 characters or more) become <player>.

Resolved, ignored, regressed

  • Resolve an issue once you've shipped the fix. If it happens again, it's marked regressed and you get a notification. Resolve it in a version and earlier instead, and only an occurrence on a newer version reopens it: servers still on the old version don't.
  • Labels (up to 5 short words per issue, like database) group issues your way; filter the list by label.
  • Bulk actions: tick issues to resolve, ignore, reopen, label or delete them together, or resolve every open issue at once. Deleting, handy for errors from testing, removes the issue and its history and is for the plugin's owner.
  • Ignore issues you won't fix; they stay ignored and don't notify you.
  • New issues and regressions show up in the dashboard's notifications.

Report errors you catch

Exceptions you handle yourself aren't logged with a stack trace, so report the ones you want to see:

public void save(Arena arena) {
    try {
        database.save(arena);
    } catch (SQLException e) {
        analytics.captureError(e);
        getLogger().warning("Couldn't save arena " + arena.getId() + ": " + e.getMessage());
    }
}

captureError sends any exception, even one that doesn't go through your package.

Limits

  • Up to 50 different issues waiting per server; 10 are sent per batch and the rest wait for the next one.
  • Messages are cut at 500 characters and stack traces at 6,000, with up to 25 lines per exception in the chain.
  • Any class in your plugin's jar counts as your code, whatever its package (the SDK itself excepted). Libraries you shade into the jar count too.
  • Obfuscated plugin? Upload the mapping of each version and stack traces show your real names. Obfuscated plugins

Logs

Logs are part of the Pro and Premium plans; errors are on every plan.

Lines your plugin writes with its logger (getLogger() on Bukkit and proxies; on mods, loggers named after your mod or its classes) are collected from every server and shown in Logs, where you can search them and filter by level, plugin version and platform.

Lines are grouped by template: numbers become #, so “Loaded 14 arenas in 82 ms” and “Loaded 9 arenas in 40 ms” are one line, Loaded # arenas in # ms, with a count and an example. Names, IPs and UUIDs are replaced as in errors.

analytics.logLevel(Level.WARNING); // only warnings and errors (default: INFO)
analytics.logLevel(Level.OFF);     // collect no log lines
  • Levels are shown as SEVERE, WARNING or INFO; anything below WARNING that passes your level shows as INFO.
  • Up to 200 different lines waiting per server, 100 sent per batch; each line is cut at 300 characters.
  • Messages with {0}-style parameters are filled in before grouping.

Tips

  • Log setup problems as warnings with a clear message (“Arena 'skywars-2' has no spawn points set”): the count across servers tells you which step of your setup guide is missing.
  • Don't log player names on purpose: they're removed only while the player is online.