Skip to main content

just add @logMethod and @logClass to add log files for your methods

Project description

[license]

llogpy

what is llogpy ?

  • llogpy is a open source logging modules developed for people who want to log certain methods in a class or a function.
  • all you have to do is decorate a function with @logMethod. If you want to log entire class i mean all methods in a class just decorate with @logClass
  • please refer to examples on how to use llogpy
  • Note Logging methods dosent works on static function in class
Screen Shot 2019-11-06 at 8 35 47 AM

Installation

pip install llogpy

Usage

from llogpy.llogpy import logMethod,logClass


class A(object):
    def __init__(self):
        pass

    @logMethod
    def method(self):
        print(" I am a method ")

    @logMethod
    def clsmethod(cls):
        print(" i am a class method ")


if __name__ == "__main__":
    obj = A()
    obj.method()
    obj.clsmethod()

Example 2

from llogpy.llogpy import logMethod,logClass

@logClass
class A(object):
    def __init__(self):
        pass

    def method(self):
        print(" I am a method ")


    def clsmethod(cls):
        print(" i am a class method ")


if __name__ == "__main__":
    obj = A()
    obj.method()
    obj.clsmethod()

Authors

Soumil Nitin Shah

Bachelor in Electronic Engineering | Masters in Electrical Engineering | Master in Computer Engineering |

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

llogpy-3.0.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file llogpy-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: llogpy-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for llogpy-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c95b436c43d2af7b8fa3ca8b7573f01129807a9891d0f877c8333bd78c713b13
MD5 223cd0c3cca1487a55a7d3642572c733
BLAKE2b-256 720c77e2ae08e5cba66909e30e5ccd836c55b022ccfa640b0172aaa6374d6fac

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