Commits (2)
import logging
# create console handler with a higher log level
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
# ch = logging.StreamHandler()
# ch.setLevel(logging.INFO)
logger=logging.getLogger("nomadcore")
logger.setLevel(logging.WARNING)
logger.addHandler(ch)
# logger.addHandler(ch)
logger2=logging.getLogger("nomad")
logger2.setLevel(logging.WARNING)
logger2.addHandler(ch)
# logger2.addHandler(ch)
def debugToFile():
"makes a full log to a file named detailed.log"
......
......@@ -669,7 +669,10 @@ def load_metainfo(filename, dependencyLoader=None, extraArgsHandling=InfoKindEl.
that were encountered in the loading.
"""
import nomad_meta_info
path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(nomad_meta_info.__file__)), "{}".format(filename)))
if os.path.isfile(filename):
path = filename
else:
path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(nomad_meta_info.__file__)), "{}".format(filename)))
return loadJsonFile(path, dependencyLoader, extraArgsHandling, uri)
def loadJsonStream(fileStream, name = None, dependencyLoader = None, extraArgsHandling = InfoKindEl.ADD_EXTRA_ARGS, filePath = None, uri = None):
......
......@@ -4,9 +4,9 @@ from sqlalchemy.orm import sessionmaker
import logging, sys
logger = logging.getLogger(__name__)
handler = logging.StreamHandler(stream=sys.stdout)
logger.setLevel(logging.INFO)
logger.addHandler(handler)
# handler = logging.StreamHandler(stream=sys.stdout)
# logger.setLevel(logging.INFO)
# logger.addHandler(handler)
Base = declarative_base()
useNested = False
......