From b6b4ff49709c89f83fd7c7addf56d17574cf48b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Wed, 10 Jan 2024 09:09:53 +0100 Subject: [PATCH] Change deprecated functionlogger to null_logger --- src/grid3d_maps/avghc/_compute_avg.py | 4 ++-- src/grid3d_maps/avghc/_compute_hcpfz.py | 4 ++-- src/grid3d_maps/avghc/_configparser.py | 4 ++-- src/grid3d_maps/avghc/_export_via_fmudataio.py | 4 ++-- src/grid3d_maps/avghc/_get_grid_props.py | 4 ++-- src/grid3d_maps/avghc/_get_zonation_filters.py | 4 ++-- src/grid3d_maps/avghc/_hc_plotmap.py | 4 ++-- src/grid3d_maps/avghc/_loader.py | 4 ++-- src/grid3d_maps/avghc/_mapsettings.py | 3 ++- src/grid3d_maps/contact/_compute_contact.py | 4 ++-- src/grid3d_maps/contact/_get_grid_props.py | 4 ++-- 11 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/grid3d_maps/avghc/_compute_avg.py b/src/grid3d_maps/avghc/_compute_avg.py index 52dc356..2a8806a 100644 --- a/src/grid3d_maps/avghc/_compute_avg.py +++ b/src/grid3d_maps/avghc/_compute_avg.py @@ -5,14 +5,14 @@ import numpy as np import numpy.ma as ma import xtgeo -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger from xtgeo.surface import RegularSurface from xtgeoviz import quickplot from ._export_via_fmudataio import export_avg_map_dataio xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def get_avg(config, specd, propd, dates, zonation, zoned, filterarray): diff --git a/src/grid3d_maps/avghc/_compute_hcpfz.py b/src/grid3d_maps/avghc/_compute_hcpfz.py index 68e74b4..a498aab 100644 --- a/src/grid3d_maps/avghc/_compute_hcpfz.py +++ b/src/grid3d_maps/avghc/_compute_hcpfz.py @@ -1,9 +1,9 @@ import numpy.ma as ma -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def get_hcpfz(config, initd, restartd, dates, hcmode, filterarray): diff --git a/src/grid3d_maps/avghc/_configparser.py b/src/grid3d_maps/avghc/_configparser.py index c0e1f80..07c3f4f 100644 --- a/src/grid3d_maps/avghc/_configparser.py +++ b/src/grid3d_maps/avghc/_configparser.py @@ -5,13 +5,13 @@ import sys import yaml -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger from grid3d_maps.avghc._loader import ConstructorError, YamlXLoader xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def parse_args(args, appname, appdescr): diff --git a/src/grid3d_maps/avghc/_export_via_fmudataio.py b/src/grid3d_maps/avghc/_export_via_fmudataio.py index b83969e..b3e6502 100644 --- a/src/grid3d_maps/avghc/_export_via_fmudataio.py +++ b/src/grid3d_maps/avghc/_export_via_fmudataio.py @@ -5,11 +5,11 @@ import fmu.dataio as dataio from fmu.config import utilities as ut -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def _get_global_config(thisconfig): diff --git a/src/grid3d_maps/avghc/_get_grid_props.py b/src/grid3d_maps/avghc/_get_grid_props.py index 3e4b644..415000f 100644 --- a/src/grid3d_maps/avghc/_get_grid_props.py +++ b/src/grid3d_maps/avghc/_get_grid_props.py @@ -5,12 +5,12 @@ import xtgeo # from xtgeo.common.exceptions import KeywordNotFoundError -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger from xtgeo.common.exceptions import DateNotFoundError, KeywordFoundNoDateError xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) # Heavy need for reprogramming...: # pylint: disable=logging-format-interpolation diff --git a/src/grid3d_maps/avghc/_get_zonation_filters.py b/src/grid3d_maps/avghc/_get_zonation_filters.py index 2aae8e8..a2c6af4 100644 --- a/src/grid3d_maps/avghc/_get_zonation_filters.py +++ b/src/grid3d_maps/avghc/_get_zonation_filters.py @@ -2,11 +2,11 @@ import numpy as np import xtgeo -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def zonation(config, grd): diff --git a/src/grid3d_maps/avghc/_hc_plotmap.py b/src/grid3d_maps/avghc/_hc_plotmap.py index 025fcd9..25dc929 100644 --- a/src/grid3d_maps/avghc/_hc_plotmap.py +++ b/src/grid3d_maps/avghc/_hc_plotmap.py @@ -6,7 +6,7 @@ import numpy as np import xtgeo -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger from xtgeo.surface import RegularSurface from xtgeoviz import quickplot @@ -14,7 +14,7 @@ xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def do_hc_mapping(config, initd, hcpfzd, zonation, zoned, hcmode): diff --git a/src/grid3d_maps/avghc/_loader.py b/src/grid3d_maps/avghc/_loader.py index ed5a947..f05ec32 100644 --- a/src/grid3d_maps/avghc/_loader.py +++ b/src/grid3d_maps/avghc/_loader.py @@ -5,14 +5,14 @@ from collections import OrderedDict import yaml -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger from yaml.constructor import ConstructorError from yaml.nodes import MappingNode file_types = (io.IOBase,) xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) class YamlXLoader(yaml.Loader): diff --git a/src/grid3d_maps/avghc/_mapsettings.py b/src/grid3d_maps/avghc/_mapsettings.py index bc06b43..6cdcd42 100644 --- a/src/grid3d_maps/avghc/_mapsettings.py +++ b/src/grid3d_maps/avghc/_mapsettings.py @@ -1,10 +1,11 @@ import copy import xtgeo +from xtgeo.common import null_logger xtg = xtgeo.common.XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def check_mapsettings(config, grd): diff --git a/src/grid3d_maps/contact/_compute_contact.py b/src/grid3d_maps/contact/_compute_contact.py index a829890..00780b1 100644 --- a/src/grid3d_maps/contact/_compute_contact.py +++ b/src/grid3d_maps/contact/_compute_contact.py @@ -1,10 +1,10 @@ import numpy as np import xtgeo -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger from xtgeo.surface import RegularSurface xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def gridmap_contact(config, specd, propd, dates): diff --git a/src/grid3d_maps/contact/_get_grid_props.py b/src/grid3d_maps/contact/_get_grid_props.py index a2f5ce1..d915b3c 100644 --- a/src/grid3d_maps/contact/_get_grid_props.py +++ b/src/grid3d_maps/contact/_get_grid_props.py @@ -6,12 +6,12 @@ import xtgeo # from xtgeo.common.exceptions import KeywordNotFoundError -from xtgeo.common import XTGeoDialog +from xtgeo.common import XTGeoDialog, null_logger from xtgeo.common.exceptions import DateNotFoundError, KeywordFoundNoDateError xtg = XTGeoDialog() -logger = xtg.functionlogger(__name__) +logger = null_logger(__name__) def files_to_import(config, appname):