Giter Site home page Giter Site logo

deepjyoti30 / simber Goto Github PK

View Code? Open in Web Editor NEW
18.0 5.0 3.0 173 KB

A simple, minimal and powerful logging library for Python

Home Page: https://simber.deepjyoti30.dev

License: MIT License

Python 100.00%
python logger logging-library logging log logs

simber's Introduction

Simple, minimal and powerful logger for Python


forthebadge made-with-python

Travis (.org) License PyPI PRs Welcome

Support me on ko-fi

Why Simber?

Simber was merely built because of some restrictions that the Python's default logging library has. This library is aimed as a simple, minimal yet powerful logging library for all Python apps. This logging library aims to take away all the disadvantages of using the default logging library and at the same time be feature filled so that the end user feels powerful using it.

simber's People

Contributors

deepjyoti30 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

simber's Issues

Invalid Python release specifier

Bug report

Checklist

[x] I have searched for similar bugs in the issues.
[x] I will add the bug label to this issue.

Version Info

  • Simber version: 0.2.5

How Simber was installed?

It cannot be installed.

Description

This is currently blocking the build for ytmdl: chaotic-aur/packages#1595

Setup fails because there's an invalid release specifier here:

python_requires=">=3.*",

This results in the following error in python-simber.log:

Warning: 'classifiers' should be a list, got type 'tuple'
error in simber setup command: 'python_requires' must be a string containing valid version specifiers; Invalid specifier: '>=3.*'

According to Python packaging guidelines the appropriate syntax is:
python_requires=">=3",

Method to destroy streams

Feature Request

Checklist

[x] I've searched the bugtracker for similar feature requests including closed ones.
[x] I will add the enhancement label to the issue.

Description

The use case is for the execution of tests using pytest. For any particular session, there may be hundreds of tests. For each test, I'd like to generate a log file.

logger = Logger("mylogger", log_path="log1.txt", format="{message}")
logger.info("Just printing an info message from the test logger")
logger.update_disable_file(True)
logger = Logger("mylogger", log_path="log2.txt, format="{message}")
logger.info("Just printing another info message from the test logger")

I noticed that I need to disable the previous logger's file stream using logger.update_disable_file(True) or it will result in duplicated messages. However, if I do this 100 times for each session, I've noticed that there are 100 streams being kept in memory.

Can we have a method to destroy streams? Or is there another way to do this?

Add ability to set date format

Feature Request

Checklist

[x] I've searched the bugtracker for similar feature requests including closed ones.
[x] I will add the enhancement label to the issue.

Description

In the formatter, we can use {time} but there's no way to set the date format as it's currently fixed to %d/%m/%Y %H:%M:%S. I'd like to set it to something else such as: %Y-%m-%d %H:%M:%S

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.