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

Uploaded Python 3

File details

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

File metadata

  • Download URL: storeerrorlogging-0.2.5.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.5.tar.gz
Algorithm Hash digest
SHA256 350912d716307d84ea8556f3e886ca41fa29bedd1cecd81db30f1bbf3c490121
MD5 818d8131ef154c940ef453d79e551e3d
BLAKE2b-256 b3bd5fc3fd841c2dae7c48f4e2db357f51ea6e4ef543ac062d926dffe8d94f7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for storeErrorLogging-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 64ec0083e6fc5fbe0fd402aba8e840aa52b0af3a73a18af71e1e44995d209618
MD5 31eaeafddbea01ba1c59ef168cbb8fb1
BLAKE2b-256 b929919ab70f2daca435fbe4b068560072dc876ab3796e402d8003a9c8f6b831

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