🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

dummylog

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dummylog

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

0.0.4
PyPI
Maintainers
1



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.NoParametersDescriptionTypeDefault Value
1log_nameName of the log instance/filestring"temp"
2logging_levellevel of logging that user neededstring"debug"
3string_formatFormatter for loggingstring"%(asctime)s: %(levelname)s: %(message)s"
3datetime_formatDate-time format for loggingstring"%m/%d/%Y %I:%M:%S %p"
4log_on_folderTrue if you want to save them in a folderboolTrue
5log_folder_nameName of the folder to save the logsstring"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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts