【问题标题】:Brightway2 : How can I increase verbosity?Brightway2:如何增加详细程度?
【发布时间】:2022-08-23 17:10:32
【问题描述】:
from brightway2 import *

projects.set_current(\"default\")

import logging

logging.basicConfig(level=logging.DEBUG,
                    filename=\"log_import.txt\",
                    filemode=\"a\",
                    format=\'%(asctime)s - %(levelname)s - %(message)s\')

logging.debug(\"La fonction a bien été exécutée\")
logging.info(\"Message d\'information général\")
logging.warning(\"Attention !\")
logging.error(\"Une erreur est arrivée\")
logging.critical(\"Erreur critique\")

e38cutoff = SingleOutputEcospold2Importer(\"/home/360.1.466-BRIGHTWAY2/Database/ecoinvent 3.8_cutoff_ecoSpold02/dataset\")

你好, 我将导入 Ecoinvent,我想知道如何增加详细程度以了解 BW2 的每一个操作,以及如何在文件 .text 或 .log 中发送潜在错误,以便进一步检查。这种方法正确吗?

    标签: python architecture environment-variables brightway


    【解决方案1】:

    我们目前不经常登录different strategies used to import ecospold2。短期内,你可以重新定义这些函数来添加用于日志记录,然后在实例化后更改属性SingleOutputEcospold2Importer.strategies。从长远来看,欢迎您提交拉取请求以添加更彻底的日志记录。例如,Ocelot 项目在each transformation function 中进行了大量登录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-19
      • 2011-09-20
      • 2017-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-23
      • 2020-04-05
      相关资源
      最近更新 更多