ScribeLog
Read this in English | Leer esto en español
ScribeLog is a lightweight Python library for logging messages to text files. It offers path validation and optional timestamp support for your log entries.
Features
- Log messages to a specified
.logfile. - Validate the file path and extension.
- Add timestamps to log entries.
- Simple configuration and usage.
Installation
To install ScribeLog, run:
pip install ScribeLog
Usage
from ScribeLog import ConfigLog, Log, GetPathLogin
# Configure the log file
ConfigLog("/path/to/yourfile.log")
# Log a message with timestamp
Log("This is a test message.")
# Log a message without timestamp
Log("Another test message.", time=False)
# Retrieve the current log file path
print(GetPathLogin())
Error Handling
If the log file path is invalid or doesn't meet the requirements, a FileError will be raised. For example:
from ScribeLog import ConfigLog, FileError
try:
ConfigLog("/invalid/path/to/file.txt")
except FileError as e:
print(f"An error occurred: {e}")
License
ScribeLog is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for ScribeLog 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scribelog-0.1.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ScribeLog-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / scribelog-0.1.0.tar.gz
| Download URL | scribelog-0.1.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6012007f59a4fe4b02540030260f9d3e715a7ea8ed7d5fadd29e43254f37ec77
|
|
BLAKE2b-256 checksum How to use checksums |
f75d17fa4609a6a13d2d777e954a27a2d7fdd1b23f31c7b669225c011ea66ca0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.10
|
Release files / ScribeLog-0.1.0-py3-none-any.whl
| Download URL | ScribeLog-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2570268174e9aefe50bcc27aa0959cb20322eca7a482d24b95396b4ba176849f
|
|
BLAKE2b-256 checksum How to use checksums |
09a4ce76fe2b5ed10bdfc682b1e32be444a2ca542bb1c0366a94180a33739433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.10
|