1
0
Fork 0
forked from github/pelican
Commit graph

9 commits

Author SHA1 Message Date
Deniz Turgut
ed3209888a Refactor logging handling
Old system was using manual string formatting for log messages.
This caused issues with common operations like exception logging
because often they need to be handled differently for Py2/Py3
compatibility. In order to unify the effort:

 - All logging is changed to `logging.level(msg, arg1, arg2)` style.
 - A `SafeLogger` is implemented to auto-decode exceptions properly
in the args (ref #1403).
 - Custom formatters were overriding useful logging functionality
like traceback outputing (ref #1402). They are refactored to be
more transparent. Traceback information is provided in `--debug`
mode for `read_file` errors in generators.
 - Formatters will now auto-format multiline log messages in order
to make them look related. Similarly, traceback will be formatted in
the same fashion.
 - `pelican.log.LimitFilter` was (ab)using logging message which
would result in awkward syntax for argumented logging style. This
functionality is moved to `extra` keyword argument.
 - Levels for errors that would result skipping a file (`read_file`)
changed from `warning` to `error` in order to make them stand out
among other logs.
 - Small consistency changes to log messages (i.e. changing all
to start with an uppercase letter) and quality-of-life improvements
(some log messages were dumping raw object information).
2014-07-22 12:39:39 -04:00
Rob Kennedy
1b6f081619 Allow socket address reuse; fixed #1264
The socket may remain in the TIME_WAIT state for some time after the
server shuts down, which prevents another instance of the server from
listening on the same port. This change allows the server to reuse the
address even when it's still waiting.
2014-02-14 14:20:38 -08:00
Rob Iwancz
301268f67f Fixes issue in devserver introduced in v3.3
Fixes an intermittent devserver problem with directory urls
containing index.html (i.e. clean urls).  It tries to send the
index.html file twice, resulting in a scrambled web page complete
with HTTP headers in the output, and sometimes Broken Pipe errors.
2013-12-04 22:26:39 +11:00
Sorin Sbarnea
3b315fbc53 Fixing #1038 by allowing nice URLs. 2013-08-12 19:23:57 +01:00
Stefan hr Berder
3da4c2e13e add port option to pelican.server 2013-07-07 12:44:21 +02:00
Félix Delval
66aae01493 Adding a message for gracefully shutting down dev server 2013-03-19 12:15:58 +01:00
Félix Delval
7fa0d3063d Creating a more explicit error message at server creation 2013-03-16 19:29:10 +01:00
Alexis Métaireau
519dcdbcb3 Manual pass on sources for better standards. 2013-03-03 20:12:31 -08:00
Dirk Makowski
71995d5e1b Port pelican to python 3.
Stays compatible with 2.x series, thanks to an unified codebase.
2013-01-11 03:20:09 +01:00