From a0084b2534f12dafdef32bb5d4eb69600e993115 Mon Sep 17 00:00:00 2001 From: Francisco Jimenez Cabrera Date: Fri, 7 Jan 2022 12:50:34 +0000 Subject: [PATCH] Include PID on talisker logs --- CHANGELOG.md | 4 ++++ canonicalwebteam/flask_base/app.py | 4 +++- setup.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f15175..6cd4ca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.9.3 (2021-10-27) + +Include PID on Talisker logs + # 0.9.2 (2021-10-27) Check static files against provided `?v=` hashes diff --git a/canonicalwebteam/flask_base/app.py b/canonicalwebteam/flask_base/app.py index f1dd79b..0b5c6a1 100644 --- a/canonicalwebteam/flask_base/app.py +++ b/canonicalwebteam/flask_base/app.py @@ -223,7 +223,9 @@ def __init__( self.context_processor(base_context) talisker.flask.register(self) - talisker.logs.set_global_extra({"service": self.service}) + talisker.logs.set_global_extra( + {"service": self.service, "pid": os.getpid()} + ) # Default error handlers if template_404: diff --git a/setup.py b/setup.py index d73c4a9..4789e83 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name="canonicalwebteam.flask-base", - version="0.9.2", + version="0.9.3", description=( "Flask extension that applies common configurations" "to all of webteam's flask apps."