A simple logging.txt library
Project description
Text File Generation Module
This Python module provides a simple logging functionality, allowing users to generate text log files.
if not exist => create file.txt
- dir/
___ logFile.txt
___ logFile-1.txt
___ logFile-2.txt
coontent file :
[17/04/2024 09:56:05] [ERROR] this is a test message error dag
[17/04/2024 09:56:05] [INFO] this is a test info message index null
[17/04/2024 09:56:05] [WARNING] this is a test warning message scripte.py break
Usage
Once installed, you can import the module into your Python script like this:
from log import log_message
log_message("logFile", "error", "this is a test message")
Additional Examples:
-
Logging an informational message:
log_message("logFile", "info", "this is an informational message")
-
Logging a warning message:
log_message("logFile-1", "warning", "this is a warning message")
-
Logging a debug message:
log_message("logFile-2", "debug", "this is a debug message")
-
Logging a critical message:
log_message("logFile", "critical", "this is a critical message")
-
Auto Log:
log_message("auto", "debug", "this is a debug message") # name file = %d%m%Y_%H%M%S.txt
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simply-log-0.2.5.tar.gz.
File metadata
- Download URL: simply-log-0.2.5.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a226b17348a9b7e2bc9f0b2f90ea4369ee29520b2830fb3e25e971f4894c51b0
|
|
| MD5 |
2458ff8f352bcad22b391dc3ce0f4ae7
|
|
| BLAKE2b-256 |
6ba679a9415a014852ef0fab18354e3de07ba296c573d7a32a8324c5dff14667
|
File details
Details for the file simply_log-0.2.5-py3-none-any.whl.
File metadata
- Download URL: simply_log-0.2.5-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b2b2735c141c8b797c557b2ada4924ab66ea79e65b7faec0908358194794807
|
|
| MD5 |
5d937f51f7fac3ef535e859c15c46be0
|
|
| BLAKE2b-256 |
a2c8a9d580c4fb86815b42a80ac46d1b2f137a14f6013aa00b7d6bd37cd55fcd
|