Merge pull request #892 from collinanderson/logconsole

Proposal: Log to console by default. #832
This commit is contained in:
Benoit Chesneau 2014-09-22 14:44:31 +02:00
commit c7ccd0d622
6 changed files with 41 additions and 5 deletions

View File

@ -90,7 +90,7 @@
]) ])
return iter([data]) return iter([data])
(tutorial) $ ../bin/gunicorn --log-file - -w 4 myapp:app (tutorial) $ ../bin/gunicorn -w 4 myapp:app
[2014-09-10 10:22:28 +0000] [30869] [INFO] Listening at: http://127.0.0.1:8000 (30869) [2014-09-10 10:22:28 +0000] [30869] [INFO] Listening at: http://127.0.0.1:8000 (30869)
[2014-09-10 10:22:28 +0000] [30869] [INFO] Using worker: sync [2014-09-10 10:22:28 +0000] [30869] [INFO] Using worker: sync
[2014-09-10 10:22:28 +0000] [30874] [INFO] Booting worker with pid: 30874 [2014-09-10 10:22:28 +0000] [30874] [INFO] Booting worker with pid: 30874

View File

@ -1,6 +1,22 @@
Changelog - 2014 Changelog - 2014
================ ================
20.0 / unreleased
-----------------
Changes
-------
Core
++++
- fix `#863 <https://github.com/benoitc/gunicorn/issues/863`_: fix race condition error.
Logging
+++++++
- fix `#832 <https://github.com/benoitc/gunicorn/issues/835>`_: log to console by default.
19.1.1 / 2014-08-16 19.1.1 / 2014-08-16
------------------- -------------------

View File

@ -100,8 +100,9 @@ to remove this issue.
Why I don't see any logs in the console? Why I don't see any logs in the console?
---------------------------------------- ----------------------------------------
Since the version R19, Gunicorn doesn't log by default in the console. In version R19, Gunicorn doesn't log by default in the console.
To watch the logs in the console you now need to use the option ``--log-file=-``. To watch the logs in the console you need to use the option ``--log-file=-``.
In version R20, Gunicorn logs to the console by default again.
Kernel Parameters Kernel Parameters
================= =================

View File

@ -1,6 +1,22 @@
Changelog Changelog
========= =========
20.0 / unreleased
-----------------
Changes
-------
Core
++++
- fix `#863 <https://github.com/benoitc/gunicorn/issues/863`_: fix race condition error.
Logging
+++++++
- fix `#832 <https://github.com/benoitc/gunicorn/issues/832`_: log to console by default.
19.1.1 / 2014-08-16 19.1.1 / 2014-08-16
------------------- -------------------

View File

@ -469,12 +469,15 @@ errorlog
~~~~~~~~ ~~~~~~~~
* ``--error-logfile FILE, --log-file FILE`` * ``--error-logfile FILE, --log-file FILE``
* ``None`` * ``-``
The Error log file to write to. The Error log file to write to.
"-" means log to stderr. "-" means log to stderr.
.. versionchanged:: 20.0
Log to ``stderr`` by default.
loglevel loglevel
~~~~~~~~ ~~~~~~~~

View File

@ -1045,7 +1045,7 @@ class ErrorLog(Setting):
cli = ["--error-logfile", "--log-file"] cli = ["--error-logfile", "--log-file"]
meta = "FILE" meta = "FILE"
validator = validate_string validator = validate_string
default = None default = '-'
desc = """\ desc = """\
The Error log file to write to. The Error log file to write to.