LogoLogo
  • About
  • Installation
  • Update & migration
  • Configuration
    • Hostname
    • TLS / HTTPS
    • Database
    • Logging
    • API Security
    • Storage
      • Disk
      • In-memory
      • S3
    • RTMP
    • SRT
    • FFmpeg
    • Sessions
    • Metrics
    • Router
    • Debug
  • API Swagger-Documentation
  • API Clients
  • Web-Interface
  • Guides
    • Beginner
    • RTMP
    • SRT
    • Filesystems
  • General
    • Prometheus metrics
  • API
    • Login
    • Config
    • Log
    • Filesystem
      • Disk
      • In-memory
      • S3
    • Metrics
    • Sessions
    • Profiling
    • Ping
  • API / FFmpeg
    • Process
      • Command
      • Metadata
      • State
      • Probe
      • Report
    • Skills
    • Widget (Website)
  • API / RTMP
    • RTMP
  • API / SRT
    • SRT
  • Development
    • Architecture
    • Coding
    • Custom Docker images
    • Benchmark
    • Support
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API

Log

Get the last log lines of the Core application.

PreviousConfigNextFilesystem

Last updated 2 years ago

Was this helpful?

The last log events are kept in memory and are accessible via the /api/v3/log endpoint. You can either retrieve the log lines in the format the Core is writing them to the console (?format=console) or in raw format (?format=raw). By default they are returned in "console" format.

You can define the number of last log lines kept in memory by either setting an appropriate value in the config (log.max_lines) or via an enviroment variable (CORE_LOG_MAX_LINES).

Read

Example:

curl http://127.0.0.1:8080/api/v3/log \
   -H 'accept: application/json' \
   -H 'Content-Type: application/json' \
   -X GET
from core_client import Client

client = Client(base_url="http://127.0.0.1:8080")
client.login()

core_log = client.v3_log_get(
    format="console"
)
print(core_log)

The GoClient always returns the logs in "raw" format.

import (
    "fmt"
    "github.com/datarhei/core-client-go/v16"
)

client, _ := coreclient.New(coreclient.Config{
    Address: "https://127.0.0.1:8080",
})

events, err := client.Log()

for _, e := range events {
    fmt.Printf("%+v\n", e)
}

Description:

Application log

get

Get the last log lines of the Restreamer application

Authorizations
Query parameters
formatstringOptional

Format of the list of log events (*console, raw)

Responses
200
application log
application/json
Responsestring[]
get
GET /v3/log HTTP/1.1
Host: api
Authorization: YOUR_API_KEY
Accept: */*
200

application log

[
  "text"
]
  • Read
  • GETApplication log