Lightsail Logger
Lightsail Logger is a simple Python application designed to aggregate and display logs from all containers within a Lightsail service in one unified view. This tool is ideal for developers and operators who need a straightforward way to monitor and analyze logs from various containers running under a single Lightsail service.
Features
- Aggregate Logs: Collect logs from multiple containers in one service.
- Unified View: Display logs from all containers in a single overview.
- Customizable: Adjust the logging window by specifying the time range.
Installation
You can install Lightsail Logger using pip. Open your terminal and run:
pip install lightsaillogger
Usage
simply import the class and call the logger method
from lightsaillogger.logger import LightsailLogger
# initiate a instance of lightsaillogger with the name of your service and the fetch interval
logger = LightsailLogger(service_name="name_of_your_container_service", fetch_interval_seconds=10)
logger.start_logging(minutes=10) # Looks back for logs in the last 10 minutes
Output:
Outputs the logs of your containers in order
2024-09-02T14:06 rq-worker 12:06:15 low: Job OK (91add817-598d-4916-bb72-1acac49871bb)
2024-09-02T14:06 rq-worker Ending mock task
2024-09-02T14:06 rq-worker 12:06:15 Result is kept for 900 seconds
2024-09-02T14:11 nginx 172.26.37.209 - - [02/Sep/2024:12:11:03 +0000] "GET /fastapistatus HTTP/1.1" 200 15 "-" "ELB-HealthChecker/2.0" "-"
2024-09-02T14:11 fastapi INFO: 172.26.37.209:0 - "GET /fastapistatus HTTP/1.0" 200 OK
2024-09-02T14:11 nginx 172.26.5.144 - - [02/Sep/2024:12:11:04 +0000] "GET /fastapistatus HTTP/1.1" 200 15 "-" "ELB-HealthChecker/2.0" "-"
2024-09-02T14:11 fastapi INFO: 172.26.28.92:0 - "GET /fastapistatus HTTP/1.0" 200 OK
2024-09-02T14:11 fastapi INFO: 172.26.5.144:0 - "GET /fastapistatus HTTP/1.0" 200 OK
2024-09-02T14:11 nginx 172.26.28.92 - - [02/Sep/2024:12:11:04 +0000] "GET /fastapistatus HTTP/1.1" 200 15 "-" "ELB-HealthChecker/2.0" "-"
Metadata
Release files for lightsaillogger 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lightsaillogger-0.1.6.tar.gz | 4.2 kB | Without provenance | Details for lightsaillogger-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lightsaillogger-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for lightsaillogger-0.1.6-py3-none-any.whl |
Total release size: 8.8 kB
Release files / lightsaillogger-0.1.6.tar.gz
| Download URL | lightsaillogger-0.1.6.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fca2dee33a96e4613a3f70cb165d4768095f48aae2990c95732f91097ea1455b
|
|
BLAKE2b-256 checksum How to use checksums |
3d66cddee54698fe1ee7f5ce2364d55f9a80d134de3f0be1e602b4f954fe45de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / lightsaillogger-0.1.6-py3-none-any.whl
| Download URL | lightsaillogger-0.1.6-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d1dec12e7be2fe1b378e373fdbf3f4065f3777f41be61dac80427cdc59827bc
|
|
BLAKE2b-256 checksum How to use checksums |
664b87d7b65f60825aed96eaa750c3fb3a72c7d20957ffeb3330a5f162d9e709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for lightsaillogger 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.