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/terms.db", includeStackForPrint = True, includeStackForError = True, saveEntireFileContentsAtStart=True, stackLimit = 20):
pathToDB - path to database, by default it is "../allData/terms.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.2.tar.gz (4.5 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.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storeerrorlogging-0.2.2.tar.gz
  • Upload date:
  • Size: 4.5 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.2.tar.gz
Algorithm Hash digest
SHA256 e1e29934cf795a232cd42df6bf31e5771b778e019be4c0c6bdeb21e57a5274ed
MD5 855bddb534b960a250d4eefec8682569
BLAKE2b-256 01290e76d5020d89654bc9e7872410d4a7d20170e233ec06b5c44b72a4a2bfdd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for storeErrorLogging-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3cbba59a410609878c24e266b7d784c56832add7deae4a580b7e6a45de95f117
MD5 07fd1c45da43d5cc6a20e2e135ba392c
BLAKE2b-256 ff13532ac3f5afc5d80190f978cae49c6b57b964722e855853a6bbfe3ca4119c

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