[PR #612] [MERGED] Logging for the stream command #1154

Closed
opened 2026-03-15 11:21:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/asciinema/asciinema/pull/612
Author: @ku1ik
Created: 2/8/2024
Status: Merged
Merged: 2/8/2024
Merged by: @ku1ik

Base: developHead: stream-logs


📝 Commits (9)

  • a42f7be Add option to save streamer logs to a file
  • 4fa684b Improve option description
  • 0478bf0 Write user notifications to streamer's log file
  • 3d3b2aa Disable ANSI colors in streamer log file
  • 582a6aa Use INFO as default streamer log level
  • 2a01e9d Log stream connects and disconnects
  • 8052670 Log viewer count upon each new stream client connection
  • bd1fb51 Drain websocket client's read side
  • 666bc4d Config file option for specifying stream log file

📊 Changes

7 files changed (+229 additions, -7 deletions)

View changed files

📝 Cargo.lock (+148 -0)
📝 Cargo.toml (+3 -1)
📝 src/cmd/stream.rs (+40 -2)
📝 src/config.rs (+5 -0)
📝 src/streamer/mod.rs (+6 -1)
📝 src/streamer/server.rs (+23 -3)
📝 src/streamer/session.rs (+4 -0)

📄 Description

This adds logging for the streamer (asciinema stream command).

Disabled by default.

Can be enabled by specifying a log file via --log-file option to stream command:

asciinema stream --log-file stream.log

Alternatively, it can be set permanently in the config file (~/.config/asciinema/config.toml):

[cmd.stream]
log_file = "/tmp/asciinema-stream.log"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/asciinema/asciinema/pull/612 **Author:** [@ku1ik](https://github.com/ku1ik) **Created:** 2/8/2024 **Status:** ✅ Merged **Merged:** 2/8/2024 **Merged by:** [@ku1ik](https://github.com/ku1ik) **Base:** `develop` ← **Head:** `stream-logs` --- ### 📝 Commits (9) - [`a42f7be`](https://github.com/asciinema/asciinema/commit/a42f7be4b1d12432985cba33922ebee7b81c302c) Add option to save streamer logs to a file - [`4fa684b`](https://github.com/asciinema/asciinema/commit/4fa684b74a0a18ec3eb0dbde59584f191a6f73c9) Improve option description - [`0478bf0`](https://github.com/asciinema/asciinema/commit/0478bf06f0238c8bcd8ef6e8cb1cdcd9121936b3) Write user notifications to streamer's log file - [`3d3b2aa`](https://github.com/asciinema/asciinema/commit/3d3b2aa9d04d1753727d4db55600ad73db5881ce) Disable ANSI colors in streamer log file - [`582a6aa`](https://github.com/asciinema/asciinema/commit/582a6aa427f492cd63c77ac9c73cf5aea8e35c68) Use INFO as default streamer log level - [`2a01e9d`](https://github.com/asciinema/asciinema/commit/2a01e9d6cb997a0b8bc7252101aa9d47ea94e15c) Log stream connects and disconnects - [`8052670`](https://github.com/asciinema/asciinema/commit/8052670ffd94a07afac483b4ebb2e1a85ce8fd3f) Log viewer count upon each new stream client connection - [`bd1fb51`](https://github.com/asciinema/asciinema/commit/bd1fb51fb473a8cf7329fcef346c1a79141e4529) Drain websocket client's read side - [`666bc4d`](https://github.com/asciinema/asciinema/commit/666bc4de3f5e8f45366c355e5f109e74d6b3b52b) Config file option for specifying stream log file ### 📊 Changes **7 files changed** (+229 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+148 -0) 📝 `Cargo.toml` (+3 -1) 📝 `src/cmd/stream.rs` (+40 -2) 📝 `src/config.rs` (+5 -0) 📝 `src/streamer/mod.rs` (+6 -1) 📝 `src/streamer/server.rs` (+23 -3) 📝 `src/streamer/session.rs` (+4 -0) </details> ### 📄 Description This adds logging for the streamer (`asciinema stream` command). Disabled by default. Can be enabled by specifying a log file via `--log-file` option to `stream` command: ``` asciinema stream --log-file stream.log ``` Alternatively, it can be set permanently in the config file (`~/.config/asciinema/config.toml`): ```toml [cmd.stream] log_file = "/tmp/asciinema-stream.log" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 11:21:27 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#1154
No description provided.