flask/requests logging
Project description
# FRL Flask Requests Logger
[![Build Status](https://secure.travis-ci.org/balanced/frl.png?branch=master)](http://travis-ci.org/balanced/frl) [![Latest Version](https://pypip.in/version/frl/badge.svg)](https://pypi.python.org/pypi/frl/) [![Downloads](https://pypip.in/download/frl/badge.svg)](https://pypi.python.org/pypi/frl/) [![Supported Python versions](https://pypip.in/py_versions/frl/badge.svg)](https://pypi.python.org/pypi/frl/) [![License](https://pypip.in/license/frl/badge.svg)](https://pypi.python.org/pypi/frl/)
A request logger for requests and responses from the requests and flask libraries that logs in a standard format
```json
{
"meta":{
},
"request":{
"headers":[
[
"Host",
"localhost"
],
[
"Content-Length",
"0"
],
[
"Content-Type",
""
]
],
"url":"http://localhost/",
"method":"GET"
},
"response":{
"status":"200 OK",
"headers":[
[
"Content-Type",
"text/html; charset=utf-8"
],
[
"Content-Length",
"12"
]
],
"data":"Hello World!"
}
}
```
## Configure flask
## Configure requests
```python
logger = frl.client.ClientRequestLogger(
'logger-name',
['card_number', 'password']
)
response = requests.get('http://google.com')
logger.log(response)
```
You can mask sensitive data from payloads.
You can add additional data into the meta field.
[![Build Status](https://secure.travis-ci.org/balanced/frl.png?branch=master)](http://travis-ci.org/balanced/frl) [![Latest Version](https://pypip.in/version/frl/badge.svg)](https://pypi.python.org/pypi/frl/) [![Downloads](https://pypip.in/download/frl/badge.svg)](https://pypi.python.org/pypi/frl/) [![Supported Python versions](https://pypip.in/py_versions/frl/badge.svg)](https://pypi.python.org/pypi/frl/) [![License](https://pypip.in/license/frl/badge.svg)](https://pypi.python.org/pypi/frl/)
A request logger for requests and responses from the requests and flask libraries that logs in a standard format
```json
{
"meta":{
},
"request":{
"headers":[
[
"Host",
"localhost"
],
[
"Content-Length",
"0"
],
[
"Content-Type",
""
]
],
"url":"http://localhost/",
"method":"GET"
},
"response":{
"status":"200 OK",
"headers":[
[
"Content-Type",
"text/html; charset=utf-8"
],
[
"Content-Length",
"12"
]
],
"data":"Hello World!"
}
}
```
## Configure flask
## Configure requests
```python
logger = frl.client.ClientRequestLogger(
'logger-name',
['card_number', 'password']
)
response = requests.get('http://google.com')
logger.log(response)
```
You can mask sensitive data from payloads.
You can add additional data into the meta field.
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
frl-0.0.1.tar.gz
(3.9 kB
view details)
File details
Details for the file frl-0.0.1.tar.gz
.
File metadata
- Download URL: frl-0.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8699e94642472ec85ab076bd0dab4194c352afac568b3e3aa96c93dbb73aeee3 |
|
MD5 | 33fd8103b456c3120e3c335509dd7e78 |
|
BLAKE2b-256 | 5fe4f79df5d16055c794bbdf84456c9d1e0178801b568defd297de918c15c4ae |