https://github.com/lucabrunox/logup
Logup is a UNIX-style command that can be used to pipe stdout logs to location on disk or in the cloud without the need of an agent, logrotate, systemd or other configuration files.
https://github.com/lucabrunox/logup
command-line-tool logging unix-style
Last synced: 4 months ago
JSON representation
Logup is a UNIX-style command that can be used to pipe stdout logs to location on disk or in the cloud without the need of an agent, logrotate, systemd or other configuration files.
- Host: GitHub
- URL: https://github.com/lucabrunox/logup
- Owner: lucabrunox
- License: gpl-3.0
- Created: 2024-09-10T20:18:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-04T18:30:21.000Z (over 1 year ago)
- Last Synced: 2025-10-26T20:18:20.529Z (8 months ago)
- Topics: command-line-tool, logging, unix-style
- Language: Rust
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About logup
Logup is a UNIX-style command that can be used to pipe stdout logs to a location on disk or in the cloud without the need of an agent, logrotate, systemd or other configuration files.
Logup is resilient: it does buffering to temp files to prevent the application from ever blocking when writing to stdout. (Not implemented yet)
Logup is transparent: it passes through the original stdout without any additional info or error messages.
## Use cases
Upload to AWS Logs:
```bash
# environment with region and credentials
$ echo foo | logup --aws --aws-log-group-name '/test/foo'
foo
```
Upload to NewRelic:
```bash
$ export NEW_RELIC_API_KEY = "..."
$ echo foo | logup --newrelic --newrelic-region EU
foo
```
Pipe stdout to disk files with log rotation, without the need to set up logrotate. (Not implemented yet)
## Installation 
To install the latest release in ~/.cargo/bin:
```bash
cargo install logup
```
## Command line usage
```
Usage: logup [OPTIONS] [INPUT_FILE]
Arguments:
[INPUT_FILE] Read logs from a file instead of stdin
Options:
--aws
Enable uploading logs to AWS Logs
--aws-log-group-name
[env: AWS_LOG_GROUP_NAME]
--aws-log-stream-name
Log stream name [default: hostname] [env: AWS_LOG_STREAM_NAME]
--newrelic
Enable uploading logs to NewRelic
--newrelic-region
[env: NEW_RELIC_REGION] [possible values: US, EU]
--newrelic-api-key
[env: NEW_RELIC_API_KEY]
--max-line-size
Force flush without newline beyond the given size [default: 1000000]
--max-memory-items
Max logs to keep in memory before dropping the incoming ones [default: 1000]
--max-retries
Max retries before dropping a log [default: 100]
-h, --help
Print help
-V, --version
Print version
```
## Roadmap
- [X] Send logs to AWS Logs
- [X] Buffering in-memory
- [X] Splitting by lines
- [X] Read from file instead of just stdout
- [ ] Make it easy to wrap a Docker entrypoint
- [ ] Buffering on-disk
- [ ] Output to disk files with log rotation
- [ ] Compression
- [ ] Logging of logup itself to disk
- [ ] Expose Prometheus endpoint of logup itself
- [ ] Distributions
- [X] Cargo
- [ ] Tar
- [ ] Deb
- [ ] Rpm
- [ ] Support more outputs
- [ ] Cloud providers
- [ ] Syslog
- [ ] OTLP
## License
Logup is licensed under the GPLv3: https://www.gnu.org/licenses/gpl-3.0.html#license-text
All contributions are welcome.