LinuxCommandLibrary

pueue-log

Show the log output of pueue tasks

TLDR

Show the last few lines of output from all tasks

$ pueue log
copy

Show the full output of a task
$ pueue log [task_id]
copy

Show the last few lines of output from several tasks
$ pueue log [task_id] [task_id]
copy

Print a specific number of lines from the tail of output
$ pueue log [[-l|--lines]] [number_of_lines] [task_id]
copy

SYNOPSIS

pueue log [TASK_ID | GROUP] [OPTIONS]

PARAMETERS

[TASK_ID | GROUP]
    The numeric ID of a specific task or the name of a task group whose log is to be displayed. This argument is generally required to specify which log to retrieve.

--full-log
    Displays the complete log output for the specified task or group, bypassing any default log truncation.

--json
    Outputs the log and associated task metadata in a machine-readable JSON format, suitable for scripting and integration with other tools.

--color
    Controls when terminal colors are used in the output. auto (default) applies colors when output is to a TTY; always forces colors regardless of output; never disables all colors.

--follow, -f
    Continuously monitors and displays new log output as it becomes available for a running task, similar to `tail -f`.

--no-wait
    When used in conjunction with --follow, this option prevents pueue-log from waiting for the task to finish before displaying its log. It immediately shows what's available.

--config
    Specifies the path to a custom Pueue configuration file to be used instead of the default.

--port
    Specifies the port number on which the Pueue daemon is listening for client connections.

--host
    Specifies the host address where the Pueue daemon is running. This allows connecting to a daemon on a remote machine or a different local interface.

--daemon
    Specifies the path to the Pueue daemon executable. This can be used to explicitly tell the client where the daemon binary is located, potentially for non-standard installations.

DESCRIPTION

pueue-log is a command-line utility within the Pueue task management system. It allows users to inspect the standard output (stdout) and standard error (stderr) logs generated by tasks managed by the Pueue daemon. This is crucial for debugging, monitoring, and understanding the execution flow of background processes. Users can view logs for specific tasks by their ID or group, retrieve full logs, stream live logs for running tasks, and control the output format, including JSON or colored output. It connects to the running Pueue daemon to fetch the requested log data, providing a centralized way to access task execution details.

CAVEATS

Logs are only available if the Pueue daemon is running and has successfully captured the task's output. Log retention policies, configurable in the pueue.yml file, dictate how long logs are stored, meaning older logs might be purged. By default, logs might be truncated; use --full-log for complete output. For active tasks, logs might not update instantly unless --follow is used.

LOG STORAGE

The Pueue daemon typically stores task logs in its designated data directory, which is often located in ~/.config/pueue/logs or ~/.local/share/pueue/logs, depending on the operating system and configuration. The pueue-log command retrieves these logs from the running daemon, rather than directly accessing the files.

TASK STATES

Logs are captured and available for tasks regardless of their final state, including running, paused, done, failed, and other terminal states, provided the task's output was successfully recorded by the Pueue daemon.

HISTORY

Pueue is a modern, cross-platform task queue and command runner designed for simplicity and efficiency in managing background processes. It emerged as a user-friendly alternative to more complex job schedulers. The pueue-log command is a core component, providing essential visibility into the standard output and standard error streams of queued and executed tasks. Its development has focused on ease of use, robust logging, and flexible output options, making it a valuable tool for both interactive debugging and automated scripting within the Pueue ecosystem.

SEE ALSO

pueue(1), pueue-add(1), pueue-status(1), pueue-history(1)

Copied to clipboard