A library for simple logging
Project description
Fibertrace
Fibertrace is a Python package that provides a logging utility for capturing and managing log entries in your applications. It offers a simple and customizable way to log messages with different log levels, timestamps, application names, modules, and user information.
Installation
To use Fibertrace, make sure you have Python installed on your system. You can install the package using pip:
pip install fibertrace
Usage
To get started with Fibertrace, you need to create a logger instance by calling the Logger class constructor. The constructor requires the log file path, application name, and a flag indicating whether to use JSON format for log entries.
from fibertrace import Logger
log_file_path = "log.txt"
application = "MyApp"
json_format = False
logger = Logger(log_file_path, application, json_format)
Once you have created the logger, you can use it to log messages with different log levels such as info
, error
, and debug
. For example:
logger.info("This is an information message.")
logger.error("This is an error message.")
logger.debug("This is a debug message.")
The log messages will be written to the specified log file, along with the corresponding log level, timestamp, application name, module, and user information. Additionally, the log messages will be printed to the console.
Conclusion
Fibertrace
simplifies logging in Python applications by providing a flexible and configurable logging utility. It helps you capture and manage log entries with ease, allowing you to track the execution flow, debug issues, and monitor your application's behavior. Feel free to explore the package further and adapt it to your specific logging needs.
For more information and detailed examples, please refer to the package documentation and source code.
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
File details
Details for the file fibertrace-0.1.5.tar.gz
.
File metadata
- Download URL: fibertrace-0.1.5.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc24bba5f63f0d2e60f11e9f059af3a5f321b1a28461a8ec76068b15594a5c5d |
|
MD5 | e318bb67d228a448e72e7bbd30d47275 |
|
BLAKE2b-256 | 6ab2828e4df63b0a0317e84f317d7cf371755c2da3e8481e4d20ecdc9ae673d2 |
File details
Details for the file fibertrace-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: fibertrace-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c140efaef2ba17b9355daf66543aed61c4d1d6402f55f241560a423f7f9306 |
|
MD5 | 5262cb3ce3cf5cd7283c273608710ccd |
|
BLAKE2b-256 | 9bbfd5a9168633dda844f4060b48804552886f0c75831276c1de007fb3436ec9 |