https://github.com/spytheman/gostamp
Timestamp and colorize the stdout and stderr streams of CLI programs.
https://github.com/spytheman/gostamp
cli go timestamp timestamping
Last synced: about 1 year ago
JSON representation
Timestamp and colorize the stdout and stderr streams of CLI programs.
- Host: GitHub
- URL: https://github.com/spytheman/gostamp
- Owner: spytheman
- License: mit
- Created: 2019-01-14T09:54:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-21T12:30:28.000Z (over 2 years ago)
- Last Synced: 2025-03-08T04:47:57.688Z (about 1 year ago)
- Topics: cli, go, timestamp, timestamping
- Language: Go
- Size: 332 KB
- Stars: 16
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gostamp
Timestamp and colorize the stdout and stderr streams of CLI programs.
(based on an idea by HN user chrismorgan here: https://news.ycombinator.com/item?id=18898764)
# Examples:
This example shows a default invokation of 'gostamp', running 'make', which produces both stdout and stderr lines:

As you can see, it is easy to distinguish between stderr (red timestamps) and stdout (green timestamps).
The example below shows the effect of the -absolute option:

# Installation:
go install github.com/spytheman/gostamp@latest
# Usage:
gostamp - Timestamp and colorize the stdout and stderr streams of CLI programs.
Usage: gostamp [options] program [programoptions]
The options are:
-absolute
use absolute timestamps
-color
colorize the output (default true)
-csv
do not format the output at all, just show the time in ns, followed by ',' then the output
-elapsed
use timestamps, showing the elapsed time from the start of the program. Can not be used with -absolute
-end
timestamp the end of the execution (default true)
-merge
merge stderr to stdout. Useful for later filtering with grep.
-micro
round timestamps to microseconds, instead of milliseconds. Can not be used with -absolute
-nobuf
run the program with stdbuf -i0 -oL -eL, i.e. with *buffering off* for the std streams
-start
timestamp the start of the execution (default true)
-version
show the tool version