Errors & logs
Every exception your plugin throws on any server, grouped into issues, and your log lines from all of them in one searchable place.
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.
Redaction
Before anything is sent, messages and stack traces are cleaned: IPv4 addresses (with their port) become <ip>, UUIDs become <uuid>, 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.
- 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 per server per hour; 10 are sent per report 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
Lines your plugin writes with getLogger() 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 per server per hour, 100 per report; 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.