Repository: huge-success/sanic (python)

Issue:
Logger not work.
**Describe the bug**
Logger did not work at current master commit (https://github.com/huge-success/sanic/commit/7d79a86d4dc48de11cd34e8ba12e41f3a9f9ff18).


**Code snippet**
```python
from sanic import Sanic
from sanic.log import logger
from sanic.response import text


app = Sanic()

@app.listener('before_server_start')
async def setup(app, loop):
    logger.info('INFO')


@app.get('/')
async def test(request):
    return text('hello world')


if __name__ == '__main__':
    app.run()
```
There is no any log/output now.



**Expected behavior**
At `0.8.3` release, it will logging/output some messages like:
```
[2018-11-05 17:34:47 +0800] [12112] [INFO] Goin' Fast @ http://127.0.0.1:8000
[2018-11-05 17:34:47 +0800] [12112] [INFO] INFO
[2018-11-05 17:34:47 +0800] [12112] [INFO] Starting worker [12112]
```


**Environment (please complete the following information):**
 - OS: Ubuntu 18.04
 - Version: https://github.com/huge-success/sanic/commit/7d79a86d4dc48de11cd34e8ba12e41f3a9f9ff18


**Additional context**
It seems that `getLogger()` does not get the correct logger at [line 56](https://github.com/huge-success/sanic/blob/master/sanic/log.py#L56) in `log.py`. The logger is trying to get a logger named `sanic.root`, but it does not exist. Rename the logger `root` at [line 9](https://github.com/huge-success/sanic/blob/master/sanic/log.py#L9) should fix this bug.


Pull request description:
fix the logger and make it work
Fixes #1395

Patch:
diff --git a/sanic/log.py b/sanic/log.py
index cb8ca524..08fc835d 100644
--- a/sanic/log.py
+++ b/sanic/log.py
@@ -6,7 +6,7 @@ LOGGING_CONFIG_DEFAULTS = dict(
     version=1,
     disable_existing_loggers=False,
     loggers={
-        "root": {"level": "INFO", "handlers": ["console"]},
+        "sanic.root": {"level": "INFO", "handlers": ["console"]},
         "sanic.error": {
             "level": "INFO",
             "handlers": ["error_console"],


Test patch:
diff --git a/tests/test_logging.py b/tests/test_logging.py
index 3af3f122..95c55de0 100644
--- a/tests/test_logging.py
+++ b/tests/test_logging.py
@@ -49,7 +49,7 @@ def test_logging_defaults():
     reset_logging()
     app = Sanic("test_logging")
 
-    for fmt in [h.formatter for h in logging.getLogger('root').handlers]:
+    for fmt in [h.formatter for h in logging.getLogger('sanic.root').handlers]:
         assert fmt._fmt == LOGGING_CONFIG_DEFAULTS['formatters']['generic']['format']
 
     for fmt in [h.formatter for h in logging.getLogger('sanic.error').handlers]:
@@ -68,7 +68,7 @@ def test_logging_pass_customer_logconfig():
 
     app = Sanic("test_logging", log_config=modified_config)
 
-    for fmt in [h.formatter for h in logging.getLogger('root').handlers]:
+    for fmt in [h.formatter for h in logging.getLogger('sanic.root').handlers]:
         assert fmt._fmt == modified_config['formatters']['generic']['format']
 
     for fmt in [h.formatter for h in logging.getLogger('sanic.error').handlers]:
@@ -82,7 +82,7 @@ def test_logging_pass_customer_logconfig():
 def test_log_connection_lost(app, debug, monkeypatch):
     """ Should not log Connection lost exception on non debug """
     stream = StringIO()
-    root = logging.getLogger('root')
+    root = logging.getLogger('sanic.root')
     root.addHandler(logging.StreamHandler(stream))
     monkeypatch.setattr(sanic.server, 'logger', root)
 
@@ -102,3 +102,15 @@ def test_log_connection_lost(app, debug, monkeypatch):
         assert 'Connection lost before response written @' in log
     else:
         assert 'Connection lost before response written @' not in log
+
+
+def test_logging_modified_root_logger_config():
+    reset_logging()
+
+    modified_config = LOGGING_CONFIG_DEFAULTS
+    modified_config['loggers']['sanic.root']['level'] = 'DEBUG'
+
+    app = Sanic("test_logging", log_config=modified_config)
+
+    assert logging.getLogger('sanic.root').getEffectiveLevel() == logging.DEBUG
+