Running Compiler to an output file
Is there a way that when you run $system.OBJ.Compileall() that you can make the output written to a file instead of the screen? I am trying to capture all the errors so I can review the code and fix them before we upgrade.
Thanks
Scott
Comments
Try using the errlog parameter, something like:
w $SYSTEM.OBJ.CompileAll(,.err)
Then you can pull the errors from the err variable and put it into a file however you want, for example using %Library.File.
Hope that helps!
![]()
After thinking about this a bit more you could probably use the open command which would be even simpler if you want to output to a file.
https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GIOD_iodevcomms
ex.
set file = "</path/to/log/file.txt>"
open file:"WNS" use file do $System.OBJ.CompileAll() close file
Other answers are good. I'll also add, if you're running from Terminal, you can go to File > Logging... and have all the output logged to a file. (This works for other things that produce output too, not just CompileAll.)