1
0
Fork 0
forked from github/pelican
Commit graph

27 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
Justin Mayer
b2ccc62582 Add troubleshooting info to CONTRIBUTING docs 2014-06-30 18:45:54 -07:00
Ondrej Grover
2e1b16826b Enhance feedback and contributing guidelines
Many folks ask for help (via IRC or filing GitHub issues) without
sufficient detail and/or without first determining if the answers to
their questions might be better sourced elsewhere. These
documentation changes encourage users to follow certain guidelines
when reaching out for help.
2014-06-30 18:34:18 -07:00
Deniz Turgut
009543b7e4 Fix test errors on OSX
On OSX, if LC_TIME and LC_CTYPE differs the output of strftime is not properly decoded
in Python 3. This makes sure that the 'utils.DateFormatter' and the related Jinja filter
'strftime' set the same value for LC_TIME and LC_CTYPE while formatting.

Also, '%a' is removed from DEFAULT_DATE_FORMAT in 'custom_locale' tests. OSX and *nix have
different conversions for '%a' ('Jeu' vs 'jeu.') and there is not a feasible way to handle
the difference for tests.
2014-06-26 01:01:42 -04:00
Ondrej Grover
3f6b130d6e Fix #1198, enable custom locale in template rendering, fixes links
reverts getpelican/pelican@ddcccfeaa9

If one used a locale that made use of unicode characters (like fr_FR.UTF-8)
the files on disk would be in correct locale while links would be to C.

Uses a SafeDatetime class that works with unicode format strigns
by using custom strftime to prevent ascii decoding errors with Python2.

Also added unicode decoding for the calendar module to fix period
archives.
2014-06-26 00:00:19 -04:00
Justin Mayer
7e06912bca Minor text changes to log message limitation 2014-04-14 16:18:07 -04:00
Rogdham
d9b0091357 Limit and filter logs
Drop duplicates logs.
Allow for logs to be grouped, enforcing a maximum number of logs per group.
Add the LOG_FILTER setting to ask from the configuration file to ignore some
logs (of level up to warning).
2014-04-01 20:44:09 +02:00
Danilo Bargen
bbea6d1747 Explicitly set locale when generating test output 2013-08-05 19:18:47 +02:00
Simon Conseil
7057d3742b Drop python 3.2 support and move to python 3.3.
Jinja 2.7 (released 2013-05-20) supports only Python3 >=3.3 so it is time to
drop Python 3.2 and move to 3.3
2013-06-02 16:23:36 +02:00
Justin Mayer
8be7c0dbae Minor documentation improvements 2013-04-16 10:13:47 -07:00
Justin Mayer
a6167f64f1 Add CONTRIBUTING file; include in contribute.rst
GitHub recently added a feature that looks for a CONTRIBUTING file in
repo root and displays it whenever a user creates an issue or submits a
pull request. I took this opportunity to put some contribution
submission guidelines into that file, including it dynamically inside
our existing docs/contribute.rst file to eliminate unnecessary
redundancy.
2013-04-13 16:55:13 -07:00
Justin Mayer
0a8678a8ae Change RELATIVE_URLS default to False - Fixes #829 2013-04-11 16:12:55 -07:00
W. Trevor King
2cb89ce528 docs/contribute.rst: Update tests/output generation for moved tests
This brings the docs back up to date after 547f8d2 (Move the tests
into pelican. Fix #500, 2013-04-06).
2013-03-06 09:24:11 -05:00
Dirk Makowski
d1b238638c Update the "how to contribute" docs with py3k info. 2013-01-11 03:21:06 +01:00
Bruno Binet
ce0723cf48 update contribute.rst doc
$USER environment variable is no longer needed
2012-11-28 00:29:52 +01:00
Justin Mayer
9dcf4e5438 Eliminate extraneous whitespace 2012-10-12 23:01:50 +02:00
Justin Mayer
24d5a6053e Various fixes and improvements to the docs 2012-08-01 18:20:12 -07:00
Bruno Binet
b44ea53741 update command to generate functional tests output
we need to force LC_ALL="C" to avoid generating articles/pages in other
languages
2012-07-05 00:11:57 +02:00
Bruno Binet
cfebb37c64 fix command to regenerate the output of basic functional test
the command needs to be prefixed by USER="Dummy Author" which is the author
name value mocked in the corresponding functional test.
2012-04-05 06:51:44 +02:00
Bruno Binet
03fdefb158 add instructions to regenerate the output of functional tests 2012-04-04 23:18:13 +02:00
Alexis Metaireau
542b8b8705 add a 'coding standards' section in the contributors' guide 2012-03-09 16:27:23 +01:00
Justin Mayer
bde06c4011 Improve English documentation with enhanced clarity, grammar, and spelling 2012-03-06 06:13:17 -08:00
Martin Brochhaus
67472298ca Added changes as per codereview. 2012-02-20 17:58:23 +01:00
Martin Brochhaus
52fb81a441 Added some fixes to the test suite so that it doesn't fail any more. 2012-02-20 17:39:47 +01:00
Alexis Metaireau
0a041c2509 python -m doesnt work for python < 2.7 2011-05-11 10:48:39 +01:00
Alexis Metaireau
eb988ab763 Update the "how to contribute" document.
Also remove an unwanted dep to Markdown and add a dev_requirement.txt file to use with pip.
2011-05-10 23:59:21 +01:00
Alexis Metaireau
0d1edc6450 Add some informations about how to contribute.
This would need a more precise description and some good practices to follow.
2011-05-10 23:42:16 +01:00