The Server page is about Asterobot itself rather than your bots. Its Status tab tells you whether Asteroboard is connected and which Asterobot it's talking to, and its Console tab shows Asterobot's log as it happens. The terminal Asterobot runs in shows the same log, with a little more detail.
The Status tab
In the sidebar, click Server: the Status tab opens first. It has four parts, from top to bottom.
Connection state
A large dot with a word tells you how Asteroboard's connection to Asterobot is doing:
| State | Dot | What it means |
|---|---|---|
| Connected | Green, pulsing | Asteroboard is connected and receives everything live. |
| Connecting… | Amber | Asteroboard is trying to connect. |
| Disconnected | Red | Asteroboard can't reach Asterobot. It tries again every second. |
When Asteroboard stays Disconnected, see Asteroboard can't connect.
The Connection card
| Row | What it shows |
|---|---|
| Server URL | The address Asteroboard uses to reach Asterobot, set in Preferences. |
| Version | The version of Asterobot, not of Asteroboard. |
| Transport | Encrypted (HTTPS) when the Server URL starts with https://, otherwise Not encrypted (HTTP). |
| Authentication | Password protected when server.basicAuth holds at least one login, otherwise No password. |
Transport is read from the address Asteroboard uses, and Authentication from the saved setting. Since server.basicAuth only takes effect after a restart, Password protected can show before the password is actually required. Asteroboard on another device explains HTTPS and passwords.
The Debug card
The Debug card gives technical numbers about the running Asterobot. You don't need them day to day, but someone helping you may ask for a few of them.
| Value | What it is |
|---|---|
| CPUs | How many processor cores Asterobot can use. |
| Goroutines | How many tasks are running inside Asterobot at that moment. |
| Cgo calls | A technical counter, only useful for troubleshooting. |
| Go version | The version of Go, the programming language Asterobot is built with. |
| OS | The system this Asterobot was built for: windows, darwin for macOS, or linux. |
| Architecture | The processor type it was built for: amd64 or arm64. |
| Compiler | The compiler used to build it. |
| Allocated and Heap allocated | The memory Asterobot uses for its data right now. |
| Total allocated | All the memory Asterobot has used for its data since it started, added up, including what it has already freed. |
| System memory | The memory Asterobot has reserved from your system. |
The numbers are read when the card loads and again after Free memory now. They don't update on their own.
Free memory now asks Asterobot to give back the memory it no longer uses right away, instead of when it would do so on its own. As the card says, it shouldn't normally be necessary. Asteroboard confirms with Garbage collection triggered, or shows Couldn't trigger garbage collection.
Shut Asterobot down
The Shutdown card stops Asterobot: "Stops the Asterobot server. Only do this if you know how to start it again."
- Click Shutdown server.
- The Shutdown the server? dialog reminds you that Asteroboard can't restart Asterobot: unless it's set up to start again on its own, someone needs access to the computer it runs on. Click Yes, shutdown, or Cancel.
Asteroboard shows Shutdown requested, and Asterobot stops about two seconds later, closing everything properly as with Ctrl+C in its terminal. Asteroboard then shows Disconnected. If the request doesn't reach Asterobot, Asteroboard shows Couldn't shut down the server and nothing stops.
Stopping Asterobot disconnects every bot, including a bot relaying the game you play. First launch covers starting it again.
The Console tab
Server > Console shows Asterobot's log live: what it does, the warnings and errors it meets, and the lines scripts write with asterobot:console.
What it shows
Each line shows the time, in your browser's time zone, the level (DEBUG, INFO, WARN or ERROR) and the text. Only the text: the details the terminal prints after a message, such as the address in Server listening, don't appear here. Lines written by a script with asterobot:console don't say which bot wrote them. A bot's own lines are on its Console tab instead (Console).
The Console tab only has what arrived while Asteroboard was open. Asterobot keeps no history for it, so lines from before you opened Asteroboard aren't there: look in the terminal for those. Asteroboard keeps the last 500 lines, forgets them when you reload or close the page, and clears them when you change its Server URL. When nothing has arrived yet, the console says "No log messages yet."
The right end of the top bar shows whether Asteroboard is connected: Connected, Connecting… or Disconnected.
Show and hide levels
The four buttons at the top, Debug, Info, Warning and Error, show or hide the lines of each level. A filled button means its lines are shown. Asteroboard remembers your choice in this browser.
These buttons only filter lines Asteroboard has already received. Lines below the server level never arrive in the first place.
Server level
The Server level list next to the buttons sets logger.webLevel: the lowest level Asterobot sends to the console. As its tooltip says, anything below it never arrives here at all, whatever the buttons show.
It's INFO by default, so debug lines don't reach the console until you pick DEBUG. The change applies at once, for every Asteroboard, and stays after Asterobot restarts because it's a saved setting. If it can't be saved, Asteroboard shows Couldn't update the server log level.
Send a message
The box at the bottom, "Send a message to the server console...", writes a line into Asterobot's own log.
- Type your text.
- Pick its level in the list under the box: Info by default.
- Press Enter, or click the send button.
Asterobot logs your text like one of its own lines. It appears in the terminal if its level is at or above the terminal's level, and on every open Console tab if it's at or above the server level: a Debug message never shows while the server level is INFO. If the message can't be sent, Asteroboard shows Couldn't send message.
A message is handy to mark a moment in the log, for example right before you reproduce a problem for a bug report.
The terminal
The terminal Asterobot runs in shows its log from the very first line, including everything before Asteroboard was opened. Each line starts with the date and time, then the level and the message, followed by its details as name=value pairs, in color.
How much it prints is set by logger.cliLevel, on Server > Config. The change applies at once, and it's independent of the console's level: you can keep a quiet terminal and a detailed console, or the other way round.
A few things in the terminal aren't log lines and always show, whatever the level: the QR code of a sign-in link, the progress bars of commands, and what commands such as gamemanager list print.
Asterobot writes no log file. When you close the terminal window, its lines are gone.
Choose a log level
Both logger.cliLevel and logger.webLevel take the same four values. Each level shows its own lines and every level above it:
| Level | What you see |
|---|---|
DEBUG |
Everything, including detailed lines meant for troubleshooting. |
INFO |
Normal activity. The default for both. |
WARN |
Warnings and errors only. |
ERROR |
Errors only. |
Switch to DEBUG when you investigate a problem or someone helping you asks for detailed logs, then go back to INFO: debug lines are numerous and bury the useful ones.