Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apptools/logger/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .logger import add_log_queue_handler, create_log_file_handler
from .logger import add_log_queue_handler
from .logger import FORMATTER, LEVEL, LogFileHandler
from .log_point import log_point
from .filtering_handler import FilteringHandler
Expand Down
28 changes: 0 additions & 28 deletions apptools/logger/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,34 +51,6 @@ def __init__(
self.setLevel(level)


@deprecated('use "LogFileHandler"')
def create_log_file_handler(
path, maxBytes=1000000, backupCount=3, level=None, formatter=None
):
"""Creates a log file handler.

This is just a convenience function to make it easy to create the same
kind of handlers across applications.

It sets the handler's formatter to the default formatter, and its logging
level to the default logging level.

"""
if level is None:
level = LEVEL
if formatter is None:
formatter = FORMATTER

handler = RotatingFileHandler(
path, maxBytes=maxBytes, backupCount=backupCount
)

handler.setFormatter(formatter)
handler.setLevel(level)

return handler


def add_log_queue_handler(logger, level=None, formatter=None):
"""Adds a queueing log handler to a logger."""
if level is None:
Expand Down
1 change: 1 addition & 0 deletions docs/releases/upcoming/218.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove deprecated create_log_file_handler function (#218)