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
15 changes: 15 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ endif::[]
//===== Bug fixes
//

=== Unreleased

// Unreleased changes go here
// When the next release happens, nest these changes under the "Python Agent version 6.x" heading
//[float]
//===== Features
//
//[float]
//===== Bug fixes

[float]
===== Pending Deprecations

* The log shipping LoggingHandler will be removed in version 7.0.0 of the agent.


[[release-notes-6.x]]
=== Python Agent version 6.x
Expand Down
7 changes: 7 additions & 0 deletions elasticapm/contrib/django/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@

class LoggingHandler(BaseLoggingHandler):
def __init__(self, level=logging.NOTSET) -> None:
warnings.warn(
"The LoggingHandler will be deprecated in v7.0 of the agent. "
"Please use `log_ecs_reformatting` and ship the logs with Elastic "
"Agent or Filebeat instead. "
"https://www.elastic.co/guide/en/apm/agent/python/current/logs.html",
PendingDeprecationWarning,
)
# skip initialization of BaseLoggingHandler
logging.Handler.__init__(self, level=level)

Expand Down
7 changes: 7 additions & 0 deletions elasticapm/handlers/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@

class LoggingHandler(logging.Handler):
def __init__(self, *args, **kwargs) -> None:
warnings.warn(
"The LoggingHandler will be deprecated in v7.0 of the agent. "
"Please use `log_ecs_reformatting` and ship the logs with Elastic "
"Agent or Filebeat instead. "
"https://www.elastic.co/guide/en/apm/agent/python/current/logs.html",
PendingDeprecationWarning,
)
self.client = None
if "client" in kwargs:
self.client = kwargs.pop("client")
Expand Down