logs the function functionality
Project description
# function_logger
Pip install-able library that logs the function functionality in log file.
Installation Instruction!
===================
>- Activate your Virtual Environment.
>- pip install function-logger
----------
**function-logger** is library having function logger that logs the function parameters.
# Features
1. Function logger library comes with a function_logger decorator that takes a logger and logs the request paramters with function name and logs the return of function.
# Usage
1. Import function logger library
- `from function_logger import function_logger`
# Example
```python
from function_logger import function_logger
from logger import logger
# logger of your project
@function_logger(logger)
def log_function(name=None, age=None):
logger.debug("Inside log function")
return dict(bmi=19)
if __name__ == "__main__":
bmi = log_function(name="hello", age=13)
print bmi
```
Pip install-able library that logs the function functionality in log file.
Installation Instruction!
===================
>- Activate your Virtual Environment.
>- pip install function-logger
----------
**function-logger** is library having function logger that logs the function parameters.
# Features
1. Function logger library comes with a function_logger decorator that takes a logger and logs the request paramters with function name and logs the return of function.
# Usage
1. Import function logger library
- `from function_logger import function_logger`
# Example
```python
from function_logger import function_logger
from logger import logger
# logger of your project
@function_logger(logger)
def log_function(name=None, age=None):
logger.debug("Inside log function")
return dict(bmi=19)
if __name__ == "__main__":
bmi = log_function(name="hello", age=13)
print bmi
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
function_logger-1.0.0.tar.gz
(1.5 kB
view details)
File details
Details for the file function_logger-1.0.0.tar.gz.
File metadata
- Download URL: function_logger-1.0.0.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f26a158ef0cd377bae660d413b02bb0ee1a41de53e1e24baa7e81d05ebd752c
|
|
| MD5 |
d3626899f652d6ee79ce9623543331a4
|
|
| BLAKE2b-256 |
de36b31c3e5ea41bf5b4dfb402d86b59cffd2c882fb2a9d4c99dc1efd4840c38
|