logging

package
v0.3.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package logging is lys-shell's log setup (lys-shell/src/core/tracing.rs and lys-shell's tracing_init): a daily file in the state directory, "<prefix>.<YYYY-MM-DD>.log", keeping the newest seven, behind the standard log package. The CLI logs to the file only, so its output stays clean; the shell also echoes to a console writer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() (string, error)

Dir is ConfigPaths::log_dir: $XDG_STATE_HOME/lys-shell, or ~/.local/state/lys-shell when XDG_STATE_HOME is not an absolute path.

func Library

func Library() *slog.Logger

Library is the logger handed to lys-ui (app.SetLogger): its warnings (an optional protocol that failed to bind) and errors (the compositor's fatal protocol error) land beside lys-shell's own lines, where GTK prints its own. lys-ui stays silent without one.

func Setup

func Setup(prefix string, console io.Writer) (io.Closer, error)

Setup routes the standard logger to prefix's daily file in Dir, and also to console when it is non-nil. Close flushes nothing (writes are unbuffered) but closes the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL