[英]How to Write logs into new file from Code Repository in foundry Platform
In code Repository when I am previewing or testing *.py file I need to put all logs into a file if already file exists logs should be appended to that file with time.在代码存储库中,当我预览或测试 *.py 文件时,我需要将所有日志放入一个文件中,如果已经存在文件,日志应该随时间附加到该文件中。 Can anyone please suggest a way for this?
任何人都可以请为此建议一种方法吗?
Explanation: I was doing pytest to test my code functionality so I want to keep test results into file that can be of.txt as I will specify the path of the file the file need to be created in the path specified with test results in it, if again tests are runned then that test results should be appended to the same file with timestamp.说明:我正在做 pytest 来测试我的代码功能,所以我想将测试结果保存到可以是 of.txt 的文件中,因为我将指定文件的路径,该文件需要在指定的路径中创建,其中包含测试结果,如果再次运行测试,则应将该测试结果附加到具有时间戳的同一文件中。
The CI shouldn't push things to git. CI 不应该把事情推到 git。 To be honest I don't even know if it has write permissions.
老实说,我什至不知道它是否具有写权限。 This means that you can't write your test results to a file within a foundry CI run.
这意味着您无法将测试结果写入代工厂 CI 运行中的文件。 The test results are always available in the CI runs though, you just need to open the checks to see them.
测试结果在 CI 运行中始终可用,您只需打开检查即可查看它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.