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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file storeerrorlogging-0.2.4.tar.gz.
File metadata
- Download URL: storeerrorlogging-0.2.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45c21ae25ea55aa7b87c83dea3266f848a301108711d2901dd47e1e0575e281c
|
|
| MD5 |
113043fd9734082676fb2d33d83e3a69
|
|
| BLAKE2b-256 |
ea0a1b4a3251dd8ac7e70ebe2378b176b88c61883079a75e0bbe9a13903420ae
|
File details
Details for the file storeErrorLogging-0.2.4-py3-none-any.whl.
File metadata
- Download URL: storeErrorLogging-0.2.4-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4925f0763d917d9b4a7534fcfc42efae9e84ae79300d1d7b742e7af6d8d1e23e
|
|
| MD5 |
969addf9dbce02d486fb29610b257cd7
|
|
| BLAKE2b-256 |
b4c3e2a28a6465702bb328caca2a8c34b8fc53edafdc411239fdb44aead1aa01
|