PlanyDocs
Playpute

Logs

What your game server printed, kept and searchable.

Everything your game server prints is kept, and you can read and search it. There is nothing to install: anything your game — or a process you launch beside it — writes to stdout or stderr ends up here.

Servers → the server → Logs

Newest first

The default order is newest first, which is the opposite of how a log reads and the right default for how one is opened: the first question is almost always "what just happened". Pass ORDER_OLDEST_FIRST (--oldest-first) to read forwards.

Narrowing it down

FieldNarrows to
containsLines containing this text, ignoring case.
streamOne stream: STDOUT, STDERR or AGENT.
time_rangeLines the server printed within this window.
agent_run_idOne run of the server — see Runs.

What a line carries

FieldNotes
observe_timeWhen the server printed it.
streamSTDOUT, STDERR, or AGENT.
textThe line, verbatim and without its trailing newline.
sequenceIts position within one run of the server, starting at 1.
ingest_timeWhen Plany received it.

STREAM_AGENT is Plany's own commentary — install progress, launch, shutdown — interleaved with your server's output rather than kept apart, because "the server died" and "Plany asked it to stop" are much easier to tell apart when you can see both in order.

observe_time and ingest_time are normally within a second of each other. A large gap means the server could not send its output for a while and sent a backlog at once — worth knowing before you read a burst of lines as a burst of activity.

Runs

A run is one start of the server. Sequence numbers restart with it, so two lines either side of a restart are ordered by which run they belong to — which is what "it worked before the restart" is a question about.

grpcurl
grpcurl -H "authorization: Bearer $PLANY_API_KEY" \
-d '{"parent": "projects//locations//gameServers/"}' \
api.plany.cloud:443 plany.gamelog.v1.LogService/ListAgentRuns

This turns a wall of lines into "the four times this server has started", each with its first and last line time, how many lines it printed, and dropped_lines.

Gaps

If lines had to be dropped rather than hold up the game, the stretch is returned as a gap in gaps, beside the lines rather than hidden, and counted in the run's dropped_lines.

A gap in a log is invisible in the lines themselves. A session that appears to last four hours because the disconnect fell in the gap looks exactly like a real one — so check gaps before trusting what surrounds it.

Logs are also how Plany knows who is playing

Player joins and leaves are read out of your server's own output, so presence and sessions work without you integrating anything.

For a game Plany has not seen before this takes a while to become reliable: Plany works out the shape of your server's join and leave lines, and does not trust what it worked out until it has checked it against real sessions. See Accuracy for a new game.

Permissions

gamelog.logs.list is held by the account and project roles, including the read-only viewer roles — somebody who can see a stuck server needs to be able to read why it is stuck.

A game server can write to its own log and cannot read it back. It runs your own code and mods, so reading back its output is not something it is given.