💄style(logging): rename logging by logging_config
naming the logging module of logwatcher like the built-in python package is confusing. By naming it `logging_config`, everything is explicit.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from logwatcher.config import *
|
from logwatcher.config import *
|
||||||
from logwatcher.logging import setup_logging
|
from logwatcher.logging_config import setup_logging
|
||||||
|
|
||||||
logger = setup_logging()
|
logger = setup_logging()
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ from logwatcher import logger
|
|||||||
|
|
||||||
def app():
|
def app():
|
||||||
logger.info("logwatcher starts its work.")
|
logger.info("logwatcher starts its work.")
|
||||||
logger.info('logwatcher has finished its task.')
|
print("hello, world!")
|
||||||
|
logger.info("logwatcher has finished its task.")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app()
|
app()
|
||||||
+1
-1
@@ -5,7 +5,7 @@ from pathlib import Path
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from logwatcher.config import FIXTURE_PATH
|
from logwatcher.config import FIXTURE_PATH
|
||||||
from logwatcher.logging import setup_logging
|
from logwatcher.logging_config import setup_logging
|
||||||
|
|
||||||
# original log directory
|
# original log directory
|
||||||
ORIGINAL_LOG_DIR = FIXTURE_PATH / "original_logs"
|
ORIGINAL_LOG_DIR = FIXTURE_PATH / "original_logs"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ from logging import DEBUG, ERROR, INFO, WARNING, FileHandler, StreamHandler, get
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from logwatcher import logger
|
from logwatcher import logger
|
||||||
from logwatcher.logging import _setup_formatter, _setup_handler, setup_logging
|
from logwatcher.logging_config import _setup_formatter, _setup_handler, setup_logging
|
||||||
|
|
||||||
|
|
||||||
def test_setup_handler(tmp_log_file):
|
def test_setup_handler(tmp_log_file):
|
||||||
|
|||||||
Reference in New Issue
Block a user