Skip to main content

module to log requests and response

Project description

to install logover use pip install logover once you install the package goto logover package and cut config.json file and put it into your folders main directory and change the "END_POINT" to wherever you want to dump your data and change "END_POINT_TO_SIMULATE_DB" to endpoint from where you will fetch includes and levels. config.json { "buffer_size":"5", "timer":"10", "END_POINT":"https://httpdump.io/bpmpg", "END_POINT_TO_SIMULATE_DB":"http://127.0.0.1:9000/", "time_to_refresh_cofg_file" : "30" }

in place of "END_POINT" put your own end point where you want to dumb the data. in include array you need to pass the route which you allow to log. If you put "*" it means you want to allow all the route. Do same configuration for levels. once you done with config file just put the code below to the end of all your route so that it will process all your route. (REMEMBER:- put this at the end of all your route. ) @app.before_request def start_timer(): print('before every request') g.start = time.time()

@app.after_request def fun(response): myRouteLog.log_request(response) return response

now in the last step :- if you want to use logger for specific task like INFO,ERROR,WARNING use like :- logover.info('your message') logover.error('your message') logover.warn('your message')

by default buffersize is 5 and time out is 30sec, if you want to change it just change in config.json file and restart the server.

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

If you're not sure about the file name format, learn more about wheel file names.

priyanshlog-0.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file priyanshlog-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: priyanshlog-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3rc1

File hashes

Hashes for priyanshlog-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea63c05947223a576415d595384e74b94e372e786599f25f6f0413fd7a4c42ce
MD5 87d83fa06d251d4726cb815ca75bcac6
BLAKE2b-256 146c28ba1552a94a5b8c2ccf2c2bb3890a95f011bbf3eeca4d9d501dc887159b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page