Skip to content

Commit

Permalink
Change deprecated functionlogger to null_logger
Browse files Browse the repository at this point in the history
  • Loading branch information
berland authored and mferrera committed Jan 11, 2024
1 parent 0fe4dd2 commit b6b4ff4
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_compute_avg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_compute_hcpfz.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_configparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_export_via_fmudataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_get_grid_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_get_zonation_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_hc_plotmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

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

from ._export_via_fmudataio import export_hc_map_dataio

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
logger = null_logger(__name__)


def do_hc_mapping(config, initd, hcpfzd, zonation, zoned, hcmode):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/avghc/_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion src/grid3d_maps/avghc/_mapsettings.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/contact/_compute_contact.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/grid3d_maps/contact/_get_grid_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b6b4ff4

Please sign in to comment.