List Server Logs
curl --request GET \
--url https://use.hoop.dev/api/server-logsimport requests
url = "https://use.hoop.dev/api/server-logs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/server-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://use.hoop.dev/api/server-logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://use.hoop.dev/api/server-logs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/server-logs")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/server-logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "default",
"fields": {},
"level": "info",
"logger": "transport/agent.go:74",
"message": "agent connected",
"source": "gateway",
"timestamp": "2024-07-25T15:56:35.317601Z"
}
]{
"message": "the error description"
}Server Logs
List Server Logs
Tail of recent in-memory runtime logs from the gateway process and connected agents
GET
/
server-logs
List Server Logs
curl --request GET \
--url https://use.hoop.dev/api/server-logsimport requests
url = "https://use.hoop.dev/api/server-logs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/server-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://use.hoop.dev/api/server-logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://use.hoop.dev/api/server-logs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/server-logs")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/server-logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "default",
"fields": {},
"level": "info",
"logger": "transport/agent.go:74",
"message": "agent connected",
"source": "gateway",
"timestamp": "2024-07-25T15:56:35.317601Z"
}
]{
"message": "the error description"
}Query Parameters
Max number of most recent entries; defaults to and is capped at the in-memory buffer capacity
Response
OK
The agent unique identifier (agent entries only)
The agent name (agent entries only)
Example:
"default"
Structured fields attached to the entry
Show child attributes
Show child attributes
The zap log level: info, warn, error, ...
Example:
"info"
The trimmed caller path that emitted the entry
Example:
"transport/agent.go:74"
The log message
Example:
"agent connected"
Where the entry was captured
Available options:
gateway, agent Example:
"gateway"
When the entry was logged
Example:
"2024-07-25T15:56:35.317601Z"
Was this page helpful?