Skip to main content

dummylog is the open source python package to help the python module/plugin developers to create/update the log files in simple syntax and easy format

Project description



dummylog is the open source python package to help the python module/plugin developers to create/update the log files in simple syntax and easy format. If you are looking for a single file based log, then dummylog is for you to keep your simple logs

If you are using Flask API or any API decorators with dummylog, it will create a new log every time since decorators will trigger the function as every new instance.

Installation

Install using pip . Offical Python Package Here!!

pip install dummylog

(OR)

Clone this Repository. Run this from the root directory to install

python setup.py install

License

The license for dummylog is MIT license

Need help?

Stuck on your dummylog code or problem? Any other questions? Don't hestitate to send me an email (selva221724@gmail.com).

Usage

1. Import Package

import dummylog

2. Initialize the dummylog Object

dl = dummylog.DummyLog()

dummylog.DummyLog() parameters

S.No Parameters Description Type Default Value
1 log_name Name of the log instance/file string "temp"
2 logging_level level of logging that user needed string "debug"
3 string_format Formatter for logging string "%(asctime)s: %(levelname)s: %(message)s"
3 datetime_format Date-time format for logging string "%m/%d/%Y %I:%M:%S %p"
4 log_on_folder True if you want to save them in a folder bool True
5 log_folder_name Name of the folder to save the logs string "logs"

3. Enjoy Logging

dl.logger.info('Log File is Created Successfully')

dl.logger.info('Unmayanaa Google Competitors')

dl.logger.error('Vada poche')

This will create a log file in the root directory of the python script.

4. To Kill the dummylog instance

dl.kill()

Note: Do not use dummylog in case if you are using the logging module in the same script for other purposes. it may conflict with the logging thread and append things to gather.

5. To Create Mutiple Logs

dl_1 = dummylog.DummyLog(log_name = 'one')
dl_1.logger.info('Log File is Created Successfully')
dl_1.logger.info('Unmayanaa Google Competitors')
dl_1.logger.error('Vada poche')

dl_2 = dummylog.DummyLog(log_name = 'two')
dl_2.logger.info('Log File is Created Successfully')
dl_2.logger.info('Unmayanaa Google Competitors')
dl_2.logger.error('Vada poche')

It will create two .log files:

logs
├── one.log
└── two.log

Sample Log File View

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

dummylog-0.0.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

dummylog-0.0.4-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file dummylog-0.0.4.tar.gz.

File metadata

  • Download URL: dummylog-0.0.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for dummylog-0.0.4.tar.gz
Algorithm Hash digest
SHA256 820cfa09d607759187e154573085b810e0064dc1ff33fcd397c293b61d80833b
MD5 73405ad26dff3ed7cb009d59202a67b1
BLAKE2b-256 02464b8f4924423d761224121432125a82c5a795db82d332d312e5d1c913083c

See more details on using hashes here.

Provenance

File details

Details for the file dummylog-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: dummylog-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for dummylog-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 07fa1a630bcbce82dac760d0d54315913a7e8ead16e17f7bed99d62d1d559879
MD5 ef22adc1e3b2b6f848989aaf65fe6cbc
BLAKE2b-256 952714be2c8a30fef4ac922b59cd4cd4b572fdb6c24e2a1f0396f225bdf99d7d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page