From aa667851e97d6e5e887e0dd92174db72818b799e Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Fri, 28 May 2021 17:46:34 +0200 Subject: [PATCH] log user-agent in deprecated endpoint --- app/api/views/alias_options.py | 6 +++--- app/api/views/new_custom_alias.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/views/alias_options.py b/app/api/views/alias_options.py index 5d96dc0b..e19182fa 100644 --- a/app/api/views/alias_options.py +++ b/app/api/views/alias_options.py @@ -27,7 +27,7 @@ def options(): existing: array of existing aliases """ - LOG.e("/alias/options is obsolete") + LOG.w("/alias/options is obsolete. User-Agent:%s", request.headers["User-Agent"]) user = g.user hostname = request.args.get("hostname") @@ -106,7 +106,7 @@ def options_v2(): """ - LOG.e("/v2/alias/options is obsolete") + LOG.w("/v2/alias/options is obsolete. User-Agent:%s", request.headers["User-Agent"]) user = g.user hostname = request.args.get("hostname") @@ -186,7 +186,7 @@ def options_v3(): """ - LOG.e("/v3/alias/options is obsolete") + LOG.w("/v2/alias/options is obsolete. User-Agent:%s", request.headers["User-Agent"]) user = g.user hostname = request.args.get("hostname") diff --git a/app/api/views/new_custom_alias.py b/app/api/views/new_custom_alias.py index 122f4048..0fc3ba1a 100644 --- a/app/api/views/new_custom_alias.py +++ b/app/api/views/new_custom_alias.py @@ -44,7 +44,7 @@ def new_custom_alias(): 409 if the alias already exists """ - LOG.e("/alias/custom/new is obsolete") + LOG.w("/alias/custom/new is obsolete. User-Agent:%s", request.headers["User-Agent"]) user: User = g.user if not user.can_create_new_alias(): LOG.d("user %s cannot create any custom alias", user)