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.6.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.6-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storeerrorlogging-0.2.6.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.6.tar.gz
Algorithm Hash digest
SHA256 8bf4268e935ed051d89ce66bec6314952c8026109ec2871745a6bc02eac94578
MD5 6dec63df433d142796956698db693b0e
BLAKE2b-256 f8bff7624a18e72531c39bfdf74376b68d428faa416cbf11ad2d00d6ba5c9c12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for storeErrorLogging-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5aabd7ac7b690681fba59145bbdbad7656b8f6429f824a81fd8b95bae3a0b841
MD5 ad7b0832f48e532a4f5ec366b1b82278
BLAKE2b-256 a1a48b50f91d8c65f1b9560fdbd7dabf64ee8c38166eb5d46b2ead8b9394867d

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