Why are FireWarning and FireError working but FireInformation is not?

吃可爱长大的小学妹 提交于 2019-12-12 03:15:25

问题


I've got a .bat script that calls an SSIS package via dtexec and redirects the output to a log file:

CALL dtexec.exe /f Package.dtsx >> logfile.txt

We don't have separate logging configured within the package since anything sent to standard out is captured in this way. This is usually enough but I'm now trying to write some custom log messages using Dts.Events.FireInformation. However, these messages are not showing up in the output at all.

If I use FireWarning or FireError then both appear in the log as expected, so I'm guessing this is some configuration of logging levels, but I can't find an option to change it.

This isn't debug information but nor is it a warning or an error - they're useful messages regarding the current processing. Why doesn't this work and how can I fix it?

Or is there a better way to write to standard out?


回答1:


I suspect that if you change your call to something like, does it solve the issue?

CALL dtexec.exe /f Package.dtsx /rep EWI >> logfile.txt

This logs the Error, Warning and Information events which without an explicit request, doesn't surface the Information. See dtexec for more info



来源:https://stackoverflow.com/questions/27802221/why-are-firewarning-and-fireerror-working-but-fireinformation-is-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!