简体   繁体   English

Brightway2:如何增加详细程度?

[英]Brightway2 : How can I increase verbosity?

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")

Hi, I'm gonna import Ecoinvent and I wanted to know how I can increase verbosity in order to know every single action of BW2 and how I can send potential errors in a file.text or.log that I can further inspect.嗨,我要导入 Ecoinvent,我想知道如何增加详细程度以了解 BW2 的每一个操作,以及如何在 file.text 或.log 中发送潜在错误,以便进一步检查。 Is this method correct?这种方法正确吗?

We currently don't log very much in the different strategies used to import ecospold2 .我们目前没有非常多地记录用于导入ecospold2的不同策略 In the short term, you can redefine these functions to add for logging, and then change the attribute SingleOutputEcospold2Importer.strategies after instantiation.短期内,您可以重新定义这些函数以添加用于日志记录,然后在实例化后更改属性SingleOutputEcospold2Importer.strategies In the longer term, you are welcome to submit a pull request to add more thorough logging.从长远来看,欢迎您提交拉取请求以添加更彻底的日志记录。 For example, the Ocelot project did extensive logging in each transformation function .例如, Ocelot项目在每个转换 function中进行了大量日志记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM