From 4bba2c204d0e7dd629c4d8c00e6e483abe56724d Mon Sep 17 00:00:00 2001 From: Nick Davidson Date: Tue, 5 Oct 2021 10:17:27 +0100 Subject: [PATCH 1/2] Bump pyyaml dependency from 5.3.1 to 5.4.1 This change also makes the absolute dependency on pyyaml a minimum version constaint for better compatibility with other pip-packages. fixes spreaker/prometheus-pgbouncer-exporter#39 --- CHANGELOG.md | 6 ++++++ requirements.txt | 2 +- setup.py | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89b04ea..280324d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.1.2 (2021-10-08) + +- Upgraded dependencies + - `pyyaml` to 5.4.1 also changed fixed version to minimum version + constraint. + ### 2.1.1 (2020-07-14) - Upgraded dependencies diff --git a/requirements.txt b/requirements.txt index 1a142bf..d8fa33b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ psycopg2==2.8.5 prometheus_client==0.8.0 python-json-logger==0.1.11 pycodestyle -PyYAML==5.3.1 +PyYAML>=5.4.1 diff --git a/setup.py b/setup.py index ab633de..55ca94d 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name = 'prometheus-pgbouncer-exporter', packages = ['prometheus_pgbouncer_exporter'], - version = '2.1.1', + version = '2.1.2', description = 'Prometheus exporter for PgBouncer', long_description = long_description, long_description_content_type = "text/markdown", @@ -22,7 +22,7 @@ keywords = ['prometheus', 'pgbouncer'], classifiers = [], python_requires = ' >= 3', - install_requires = ['psycopg2 == 2.8.5', 'prometheus_client==0.8.0', 'python-json-logger==0.1.11', 'PyYAML==5.3.1'], + install_requires = ['psycopg2 == 2.8.5', 'prometheus_client==0.8.0', 'python-json-logger==0.1.11', 'PyYAML>=5.4.1'], entry_points = { 'console_scripts': [ 'pgbouncer-exporter=prometheus_pgbouncer_exporter.cli:main', From 683879a2e0b281b2d04b8f5858dca0b14d424dc8 Mon Sep 17 00:00:00 2001 From: Alan Braggins Date: Wed, 27 Apr 2022 17:27:34 +0100 Subject: [PATCH 2/2] Update format string for json logger Copied from https://github.com/spreaker/prometheus-pgbouncer-exporter/pull/42 --- prometheus_pgbouncer_exporter/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prometheus_pgbouncer_exporter/cli.py b/prometheus_pgbouncer_exporter/cli.py index b81a5da..81cbd35 100644 --- a/prometheus_pgbouncer_exporter/cli.py +++ b/prometheus_pgbouncer_exporter/cli.py @@ -44,7 +44,7 @@ def main(): # Init logger logHandler = logging.FileHandler(args.log_file) if args.log_file is not "stdout" else logging.StreamHandler() - formatter = jsonlogger.JsonFormatter("(asctime) (levelname) (message)", datefmt="%Y-%m-%d %H:%M:%S") + formatter = jsonlogger.JsonFormatter("%(asctime)s %(levelname)s %(message)s`", datefmt="%Y-%m-%d %H:%M:%S") logHandler.setFormatter(formatter) logging.getLogger().addHandler(logHandler) logging.getLogger().setLevel(args.log_level)