Skip to main content

A Fast & Fancy version of logging

Project description

FancyLogger

Downloads Downloads Downloads
With this library, Log in style!

This library is still under development, so we appreciate if you help us improve it on the GitHub!

Having an issue?

You can always find someone on our discord server here:

https://discord.agmstudio.xyz/

Wiki

The official wiki of this library is now available at GitHub

https://git.agmstudio.xyz/FancyLogger/wiki

How to install

To install just use following command

pip install PyFancyLogger

This library will have dev/beta builds on the GitHub, to install them you can use

pip install --upgrade git+https://github.com/AGM-Studio/FancyLogger.git

Example

This is based on file below:

https://github.com/AGM-Studio/FancyLogger/blob/master/test.py

from FancyLogger import FancyLogger, FancyFormatter, Formats

logger = FancyLogger('Test', FancyFormatter(Formats.detailed))

logger.setLevel(0)

if __name__ == '__main__':
    logger.debug('This is a debug')
    logger.info('This is an info')
    logger.warning('This is a warning')

    try:
        int('Not an int')
    except Exception as e:
        logger.error(f'This is an error for {e}')

    try:
        int('Not an int either')
    except Exception as e:
        logger.exception(f'This is an error for {e}')

    logger.critical('IMPORTANT: THIS IS A CRITICAL MESSAGE')

    print('\n----- Testing Sub loggers -----\n')

    logger.sub('Sub 1').info('A sub to the parent')
    logger.sub('Sub 2').info('Another sub logger!')

    logger.sub('Sub 1').info('Previous one is still available!')
    logger.sub('Sub 1').sub('Sub in Sub').critical('EVEN SUBS CAN HAVE SUBS!')

Result

Advertisement Banner

Extras & Features

...

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

pyfancylogger-0.3.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

pyfancylogger-0.3.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file pyfancylogger-0.3.2.tar.gz.

File metadata

  • Download URL: pyfancylogger-0.3.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.31.0 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.6

File hashes

Hashes for pyfancylogger-0.3.2.tar.gz
Algorithm Hash digest
SHA256 362700547e5488eed52b7b3bce3add7db7753739a215cc42591abcf8f00533ba
MD5 b1bdc8e7cc73b62389b498dc0b66c607
BLAKE2b-256 dd31e6e2594fdf109605d8f59e608633bac9ee93501a4260a6befdd14c050c30

See more details on using hashes here.

File details

Details for the file pyfancylogger-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: pyfancylogger-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.31.0 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.6

File hashes

Hashes for pyfancylogger-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bce8b535ccf9e65850f6d268a3323ed77dcae6eacee4264f86472109fc974a5e
MD5 81896b96487140ebc864035aa15af1f6
BLAKE2b-256 709e53765e1706829582cc8102556055abd938e0a077bc8075177dd0ecb2924f

See more details on using hashes here.

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