Skip to content

Commit

Permalink
Set logger if not present
Browse files Browse the repository at this point in the history
  • Loading branch information
ndaelman committed Jul 9, 2024
1 parent 92ee745 commit f4a7fab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/nomad_parser_vasp/parsers/xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
)

import numpy as np
from nomad import utils
from nomad.config import config
from nomad.units import ureg
from nomad.parsing import MatchingParser
Expand All @@ -32,8 +33,12 @@ def parse(
logger: BoundLogger,
child_archives: dict[str, EntryArchive] = None,
) -> None:
# logging
if logger is not None:
logger.info('VasprunXMLParser.parse', parameter=configuration.parameter)
logger = utils.get_logger(__name__)
logger.info('VasprunXMLParser.parse', parameter=configuration.parameter)

# read and process data
xml_reader = XMLParser(mainfile=mainfile) # XPath syntax

def xml_get(path: str, slicer=slice(0, 1), fallback=None):
Expand Down

0 comments on commit f4a7fab

Please sign in to comment.