简体   繁体   English

默认phing日志文件位置?

[英]Default phing log file location?

I am debugging a phing-based workflow and wish to see errors in detail. 我正在调试基于phing的工作流,并希望详细查看错误。 (An error is being sent to standard output when I run my phing-based migration script, but it is fairly minimal.) (当我运行基于phing的迁移脚本时,错误会发送到标准输出,但这相当少。)

The main file that seems to be prescribing phing behaviors is called migrate.xml, and I have checked in that file for any mention of the string "log" with no results. 似乎规定了phing行为的主文件称为migration.xml,并且我已经在该文件中签入了对字符串“ log”的任何提及,但没有结果。 So I assume that phing is logging to whatever location it logs to by default. 因此,我假设phing会记录到默认情况下记录到的任何位置。 So far, I have looked in /var/log and found no file containing the string "phing." 到目前为止,我查看了/ var / log,未找到包含字符串“ phing”的文件。

So my question is this: Is there a default location for phing logs? 所以我的问题是: phing日志有默认位置吗? A quick perusal of Google and the phing documentation has so far found nothing, but I'd be quite happy if it turned out that I missed something, in which case maybe this question helps someone else. 到目前为止,对Google和phing文档的快速浏览都没有发现任何内容,但是如果发现我错过了某些内容,我会很高兴,在这种情况下,这个问题可能会对其他人有所帮助。 A secondary question if we can't answer the main question might be "how might one find the place where phing is sending log output?" 我们不能回答主要问题的第二个问题可能是“如何找到phing发送日志输出的位置?”

For what it's worth, I found some output related to phing in my default php.log file, living in the /var/log directory. 对于它的价值,我在默认的php.log文件中的/var/log目录中找到了一些与phing相关的输出。

But this probably isn't everything I was looking for. 但这可能不是我想要的一切。 Phing includes a -logfile option, which leads me to believe it can log more than what goes to the PHP log by default. Phing包含-logfile选项,这使我相信它可以记录的内容比默认情况下记录到PHP日志的内容还多。

==== ====

Edit: I did some poking around over the weekend, and it looks like the -logfile argument just causes the output that would normally go to stdout to be instead rerouted to a file. 编辑:我在周末进行了一些拨弄,看起来-logfile参数只是导致通常会转到stdout的输出改为重新路由到文件。 So it appears there's no "default log location" for Phing, beyond what goes to the standard PHP error log. 因此,除了标准的PHP错误日志外,似乎Phing没有“默认日志位置”。

A slight consolation: I found that in addition to the -verbose command line argument -- which I had known about -- there's also a -debug argument that can give some additional information. 稍微安慰一下:我发现除了-verbose命令行参数(我已经知道)之外,还有一个-debug参数可以提供一些其他信息。 So maybe that information helps someone. 因此,也许这些信息对某人有所帮助。

Since Phing 2.10.0 you could also use the record task to define your own file based logging workflow. Phing 2.10.0开始,您还可以使用record任务来定义自己的基于文件的日志记录工作流。

    <!-- INIT -->
    <record name="verbose.log" loglevel="verbose" append="true" emacsmode="true"/>
    <!-- START -->
    <record name="verbose.log" action="start"/>
    <!-- STOP -->
    <record name="verbose.log" action="stop"/>

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

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