Skip to content

Commit

Permalink
Merge branch 'master' into JP-3741
Browse files Browse the repository at this point in the history
  • Loading branch information
emolter authored Sep 13, 2024
2 parents 177ab42 + 760e085 commit f7d9b55
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ associations

- Update warning message about use of paths in associations. [#8752]

- Remove ``MultilineLogger`` and no longer set it as the default logger. [#8781]

badpix_selfcal
--------------

Expand Down
24 changes: 0 additions & 24 deletions jwst/associations/lib/log_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from logging.config import dictConfig
from collections import defaultdict

from functools import partialmethod


__all__ = ['log_config']

Expand Down Expand Up @@ -147,28 +145,6 @@ def format(self, record):
}


class MultilineLogger(logging.getLoggerClass()):
"""Split multilines so that each line is logged separately"""

def __init__(self, *args, **kwargs):
super(MultilineLogger, self).__init__(*args, **kwargs)

def log(self, level, msg, *args, **kwargs):
if self.isEnabledFor(level):
for line in msg.split('\n'):
self._log(level, line, args, **kwargs)

debug = partialmethod(log, logging.DEBUG)
info = partialmethod(log, logging.INFO)
warning = partialmethod(log, logging.WARNING)
error = partialmethod(log, logging.ERROR)
critical = partialmethod(log, logging.CRITICAL)
fatal = critical


logging.setLoggerClass(MultilineLogger)


def log_config(name=None,
user_name=None,
logger_config=None,
Expand Down
6 changes: 3 additions & 3 deletions jwst/model_blender/_schemautil.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def callback(subschema, path, combiner, ctx, recurse):
return # ignore ObjectNodes

# strip trailing path if there's a combiner
for combiner in ['anyOf', 'oneOf']:
if combiner in path:
path = path[:path.index(combiner)]
for schema_combiner in ['anyOf', 'oneOf']:
if schema_combiner in path:
path = path[:path.index(schema_combiner)]
break

# construct the metadata attribute path
Expand Down

0 comments on commit f7d9b55

Please sign in to comment.