PhantomJS / Javascript:写入文件而不是控制台 [英] PhantomJS / Javascript: write to file instead of to console

查看:70
本文介绍了PhantomJS / Javascript:写入文件而不是控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从PhantomJS,如何写入日志而不是控制台?

From PhantomJS, how do I write to a log instead of to the console?

在示例中 https://github.com/ariya/phantomjs/wiki/Examples ,它总是(在我看过的那些)中说出如下内容:

In the examples https://github.com/ariya/phantomjs/wiki/Examples, it always (in the ones I have looked at) says something like:

console.log('some stuff I wrote');

这不太有用。

推荐答案

所以我想出来了:

>phantomjs.exe file_to_run.js > my_log.txt

这篇关于PhantomJS / Javascript:写入文件而不是控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆