Skip to main content

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 .log file.
  • 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)

Source distribution for ScribeLog 0.1.0
File Size Uploaded
scribelog-0.1.0.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ScribeLog 0.1.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page