Commit graph

31 commits

Author SHA1 Message Date
Jennifer Richards 6a96a69234
feat: improve / clean up logging (#7591)
* refactor: always use console log handler

* refactor: json for k8s, plain otherwise

* chore: remove syslog from wsgi.py

* chore: remove debug.log()

* chore: drop syslog from settings.py

* refactor: use log.log() in person.utils

* refactor: fetch_meeting_attendance->log.log()

* chore: gunicorn logs as JSON (wip)

* feat: better json log formatting

* refactor: improve log config

* feat: gunicorn access log fields

* fix: remove type hints

The gunicorn logger plays tricks with the
LogRecord args parameter to let it have string
keys instead of being a simple tuple.
The mypy tests rightly flag this. Rather
than fighting the typing, just remove the
hints and leave a comment warning not to
use the gunicorn-specific formatter with
other loggers.
2024-06-26 14:53:05 -05:00
Sangho Na 10cd14f174
refactor: Drop dependency on decorator package (cont) (#7219) 2024-03-18 02:51:42 -05:00
Lars Eggert 159f89ebf3
chore: Remove six and pathlib2 from deps (#4031)
Fixes: #3895 and #3892
2022-05-31 09:12:45 -05:00
Henrik Levkowetz d4106f38c9 Added a couple of functions to debug.py
- Legacy-Id: 17912
2020-06-06 20:12:00 +00:00
Henrik Levkowetz 33e8733b91 Fixed up mypy issues or added type:ignore comments as needed for a clean mypy run.
- Legacy-Id: 16772
2019-09-30 15:42:18 +00:00
Henrik Levkowetz 96690f5d7b Reverted a change to debug.type()
- Legacy-Id: 16442
2019-07-15 15:19:06 +00:00
Henrik Levkowetz d0f1018734 Tweaked the debug.type() display.
- Legacy-Id: 16317
2019-06-28 13:23:32 +00:00
Henrik Levkowetz 493b8daccd Enhanced debug.py: made the mark() function indicate file and line number it was called from. Added if debug: conditions around some other function actions.
- Legacy-Id: 15014
2018-04-05 13:14:09 +00:00
Henrik Levkowetz cc9ef7a5f5 Added a show_caller() method to debug.py
- Legacy-Id: 15005
2018-04-04 17:09:21 +00:00
Henrik Levkowetz 6e46de45d4 Tweaked debug.py
- Legacy-Id: 12238
2016-10-30 18:02:13 +00:00
Henrik Levkowetz c6177d4f92 Added call duration information to the @debug.trace decorator.
- Legacy-Id: 12224
2016-10-28 16:41:59 +00:00
Henrik Levkowetz 3327240c47 Additional changes to the output of @debug.trace
- Legacy-Id: 12060
2016-09-30 10:32:16 +00:00
Henrik Levkowetz c5709e3349 Added called-from information to the debug.trace output.
- Legacy-Id: 12058
2016-09-29 21:22:32 +00:00
Henrik Levkowetz 67415af1e1 Remove debug.py's dependency on django. Set debug.debug in settings.py instead.
- Legacy-Id: 11948
2016-09-09 05:41:20 +00:00
Henrik Levkowetz b0906f04af Basic charting of new revision activity for document search results.
- Legacy-Id: 11922
2016-09-06 09:47:22 +00:00
Henrik Levkowetz cf7d794b09 Modified the test data to use some AD and WG chair names that contain non-ascii characters, and fixed test issues found.
- Legacy-Id: 10418
2015-11-04 07:34:56 +00:00
Henrik Levkowetz 849e329a39 Tweaked the traceback() debug function.
- Legacy-Id: 7663
2014-04-28 16:30:49 +00:00
Ole Laursen f9d400ae5c Move decorator import in debug.py closer to actual usage points so the
decorator library is not imported unless needed - it doesn't appear to
be part of Python 2.7 so needs to be installed separately
 - Legacy-Id: 6765
2013-11-27 13:15:52 +00:00
Henrik Levkowetz 3bb7dc77c0 Limited the length of the debug display of function return values.
- Legacy-Id: 6458
2013-10-17 11:24:21 +00:00
Henrik Levkowetz a758639936 Tweaked the debug module, added traceback capability and a combined name/value/type info funciton.
- Legacy-Id: 6306
2013-09-29 20:46:14 +00:00
Henrik Levkowetz 6baea429aa Merged in the nomcom app from ejimenez@yaco.es and esanchez@yaco.es, and accompanying dbtemplate app and the (standard) docutils module. Added some tweaks to get all tests to pass and migrations to run.
- Legacy-Id: 5948
2013-08-06 10:09:29 +00:00
Henrik Levkowetz 0e67b2c758 Tweaked the handling of the syslog module not being available on windows.
- Legacy-Id: 5058
2012-11-07 21:41:02 +00:00
Henrik Levkowetz e896ead272 Merged [5001] from jmh@joelhalpern.com:
Make comments optional on WG adoption and WG state changes.
 - Legacy-Id: 5016
Note: SVN reference [5001] has been migrated to Git commit 1057dbf631c22669cf35d0d52769945b9836f516
2012-11-07 13:04:05 +00:00
Henrik Levkowetz 3a7480520f Merged [4999] from jmh@joelhalpern.com:
Correct test of final shepherd update flag.
 - Legacy-Id: 5014
Note: SVN reference [4999] has been migrated to Git commit aba18e8f38364ad17d451d0ed7e33aa01dfbeb52
2012-11-07 12:50:38 +00:00
Henrik Levkowetz cfe466eb37 Merged [4991] from adam@nostrum.com:
Fixing time column wrapping problem that exhibits in (at least) Safari.
 - Legacy-Id: 5008
Note: SVN reference [4991] has been migrated to Git commit 5e384591fd
2012-11-06 15:23:17 +00:00
Henrik Levkowetz 18aa1749f2 Remove strict dependency on syslog from debug.py, too.
- Legacy-Id: 4988
2012-10-31 14:35:58 +00:00
Henrik Levkowetz 7f42117210 Tweaks to debug.py.
- Legacy-Id: 4957
2012-10-25 21:28:39 +00:00
Henrik Levkowetz 1f8cc48792 Use decorator.decorator consistenly in debug wrappers.
- Legacy-Id: 4936
2012-10-21 14:32:02 +00:00
Henrik Levkowetz ba95520523 Updated version of debug.py, which adds timing and profiling support functions.
- Legacy-Id: 4935
2012-10-21 12:38:48 +00:00
Henrik Levkowetz fa35a8f8fe Don't initialize syslog here -- it might override the app's initialization. (Python will do an empty call to syslog.openlog() if not already done when first calling syslog.syslog().)
- Legacy-Id: 4554
2012-06-29 00:36:17 +00:00
Henrik Levkowetz 51a3c373c5 Added a debug utility module on the same level as south,html5lib etc.
- Legacy-Id: 4446
2012-06-11 15:56:51 +00:00