Skip to main content

This module makes flask error reporting and normal error reporting get reported inside an sql database. It also provides a printt function that also saves statements to the database.

Project description

This module makes flask error reporting and normal error reporting get reported inside an sql database. It also provides a printt function that also saves statements to the database.
Database Structure:
table overall_run:
overallRun_id - id associated with each time you run app.
overallFileContent - optional; records entire file contents of main file for app.
filePath - records full path to app file.
timestamp - time stamp of when you started app.

table log_entries:  
    logEntry_id - id associated with a log entry.  
    level - error level  
    traceBack - optional; functions leading to call  
    message - error message  
    timestamp - time of error  
    overallRun_id - links to overall_run table  

table print_entries:  
    printEntry_id - id associated with print statement  
    traceBack - optional; functions leading to call  
    message - text printed  
    timestamp - time of print statement  
    overallRun_id - links to overall_run table  

error levels:  
    Level Name	Constant	What it Means  
    DEBUG - Detailed internal info (e.g., for devs)  
    INFO - General operational messages  
    WARNING - Something unexpected happened, not fatal  
    ERROR - A serious problem that may affect behavior  
    CRITICAL - A severe error that likely crashes stuff  

init(self, pathToDB = "../allData/errorLogging.db", includeStackForPrint = True, includeStackForError = True, saveEntireFileContentsAtStart=True, stackLimit = 20):
pathToDB - path to database, by default it is "../allData/errorLogging.db".
includeStackForPrint - whether stack (functions leading to print statement) is saved. by default is True.
includeStackForError - whether stack (functions leading to error) is saved. by default is True.
saveEntireFileContentsAtStart - whether the entire file contents of the primary app file is saved or not.
stackLimit - limit of items in stack - by default is 20.

printt(self, args, flushIfPrinting=True, kwargs):
functions like a normal print statement.
my observation is that print statements in flask often don't show unless you force it to flush to the system after each statement, so that is set to default true with this variable flushIfPrinting.

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

storeerrorlogging-0.2.9.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

storeErrorLogging-0.2.9-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file storeerrorlogging-0.2.9.tar.gz.

File metadata

  • Download URL: storeerrorlogging-0.2.9.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for storeerrorlogging-0.2.9.tar.gz
Algorithm Hash digest
SHA256 6565b22154e069c3bfd980ec11c3afbbbb1203a372bd2a8f8719e61cb810b8f7
MD5 c21408e77d67e33c0cce7e422a3152f5
BLAKE2b-256 c2e3e0eb5e574ad0e0828ba879ab31129407a00d9961410c198dadae36b22a83

See more details on using hashes here.

File details

Details for the file storeErrorLogging-0.2.9-py3-none-any.whl.

File metadata

File hashes

Hashes for storeErrorLogging-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 abe4bb483c09249dbd26451817f46d116f986459887245de97bc2b4fb55da4d3
MD5 c9c1b6233429a846839d90aaf2685a4f
BLAKE2b-256 aec83d25ba24b4bd1b130e4f334dc376507f8f074d9b57e8b4802d6dfbe91393

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