From 345c0b7125b19d81d182251e975a69c479debb30 Mon Sep 17 00:00:00 2001 From: Mathias Lohne Date: Wed, 12 Jun 2024 12:12:34 +0200 Subject: [PATCH] Remove newlines from log message (#333) This makes the logs less grep-able --- CHANGELOG.md | 7 ++++++- cognite/extractorutils/__init__.py | 2 +- cognite/extractorutils/uploader/time_series.py | 4 ++-- pyproject.toml | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7555b7..5e114695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,12 @@ Changes are grouped as follows - `Fixed` for any bug fixes. - `Security` in case of vulnerabilities. -## Next Release + +## 7.2.1 + +### Changed + + * Reformat log messages to not have newlines ### Fixed diff --git a/cognite/extractorutils/__init__.py b/cognite/extractorutils/__init__.py index 6e33306e..e1894534 100644 --- a/cognite/extractorutils/__init__.py +++ b/cognite/extractorutils/__init__.py @@ -16,5 +16,5 @@ Cognite extractor utils is a Python package that simplifies the development of new extractors. """ -__version__ = "7.2.0" +__version__ = "7.2.1" from .base import Extractor diff --git a/cognite/extractorutils/uploader/time_series.py b/cognite/extractorutils/uploader/time_series.py index bd9364be..c67340e4 100644 --- a/cognite/extractorutils/uploader/time_series.py +++ b/cognite/extractorutils/uploader/time_series.py @@ -264,9 +264,9 @@ def _upload_batch(upload_this: List[Dict], retries: int = 5) -> List[Dict]: missing = [id_dict for id_dict in ex.not_found if id_dict.get("externalId") not in retry_these] missing_num = len(ex.not_found) - len(create_these_ids) self.logger.error( - f"{missing_num} time series not found, and could not be created automatically:\n" + f"{missing_num} time series not found, and could not be created automatically: " + str(missing) - + "\nData will be dropped" + + " Data will be dropped" ) # Remove entries with non-existing time series from upload queue diff --git a/pyproject.toml b/pyproject.toml index 01a4e143..602fccd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cognite-extractor-utils" -version = "7.2.0" +version = "7.2.1" description = "Utilities for easier development of extractors for CDF" authors = ["Mathias Lohne "] license = "Apache-2.0"