Comments (5)
I have some limited experience with logging, so here is how I see it:
- simply use
logging.debug()
,logging.error()
,logging.warning()
etc. (or rather loggers) - The easiest way would be to setup logging to a file
- The logging module has the concept of handlers which are responsible for logging to a target. (e.g. there are already handlers for logging to streams, files or even the network builtin). We would need to use (write) a handler that logs to a database. A quick search shows that has already been done for sqlite. So that shouldn't be a big problem.
The api call would then just be a db query.
A bit of self-promotion, but maybe it's something you find useful: I have written some code that lets you simplify the logging process (especially in object oriented programming). For example inheriting classes can use self.debug()
/self.info()
,... and the class is the logger name (optionally an id). It can also add the function name where the log statement was called from.
The package is called flotils (not very creative on my part) and a detailed example is in the docs
[end of self promo]
from paperless.
Well I'm feeling like death today, but later this week I'll take a look at these links and work something out. Thanks for the input!
from paperless.
I've now totally overhauled the logging system, making proper use of the Python's logging module.
from paperless.
Hi,
is it possbile to turn the logging of served thumbnails off? Loading the "Documents" page causes a lot of logging messages like
Jan 22 11:45:51 brick python[466]: [22/Jan/2019 11:45:51] "GET /fetch/thumb/311 HTTP/1.0" 200 42941
Thanks,
Jan
from paperless.
Not that I know of. The thumbnails (and documents) are all served through Django to maintain security and handle decryption (if enabled). The files can't be accessed without going through the Paperless/Django server, and so they get logged.
You might be able to fiddle with Django's LOGGING
variable in settings.py, but I wouldn't know how to do it off-hand. If you figure it out though, feel free to add some documentation to the project :-)
from paperless.
Related Issues (20)
- Uploade with Webgui or App HOT 3
- docker-compose fails to build with the last version of Pipenv HOT 3
- Correnspondent picked from filename
- Docker Container Unhealthy
- Problem pulling static content with reverse proxy
- ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models' in __init__.py
- Not detecting new files via ftp only via smb
- Consumer uses 100% CPU when idle HOT 3
- [Feature] - Templates for OCR (Zonal OCR) using KULL
- Problem using docker-compose HOT 2
- gunicorn cannot read files? wrong permissions? HOT 2
- consumer not running in Synology Docker HOT 9
- Provide as Yunohost App
- Dockerfile: Unable to open /etc/sudoers: Permission denied HOT 1
- Paperless-ng is here. Thoughts on merging into master. HOT 18
- Disabling encryption failing after one file HOT 10
- Docker Install : No such file or directory 'python3 HOT 2
- Docker install: ERROR: for consumer Container "a713bc3650c5" is unhealthy.
- ERROR Error while consuming document img_20180606_204601.893.jpg: Invalid rotation (0) HOT 1
- Paperless in Kubernetes with NFS Backing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paperless.