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

Uploaded Python 3

File details

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

File metadata

  • Download URL: storeerrorlogging-0.2.8.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.8.tar.gz
Algorithm Hash digest
SHA256 def502739010bb6535a77ad1cd66c6c4d1b20e542e8a7857366083a55dea7d66
MD5 768940d282dfa2aa9dd84706fe910434
BLAKE2b-256 3347b310030a3d0e0a7f5192fdfdabb935b6fc36bb927956c40daa9e67cff9e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for storeErrorLogging-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ce30ec692e0d3ff9d123266560a9420c4c17d7158611fa94d04698f2d4545802
MD5 84f1ec991006ccf47c3a8eeb6db21dfc
BLAKE2b-256 93ada53951e54e44d1616a4a9a49dfc9c3f8fca360fe93d2728d525a67eaf20e

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