How to access the output log?

Feb 26, 2009 at 1:31 PM


How do I access the "verbose" output when I enable the verbose mode?


Feb 26, 2009 at 10:17 PM
Hi CheloXL.

have you tried to manually run msbuild against your msbuild.xml file with verbose?

eg. open up a command prompt (eg. run -> cmd)
goto the directory where the msbuild.xml file exists
type msbuild msbuild.xml
enjoy to output (which should be bucket loads).
if the cmd cannot understand/find the msbuild.exe command, please search on google to find out how to find/locate that file, etc.

With verbose output as part of the web deployment project build, i'm not sure how to grab that output. I'm guessing you'll need to define the ouput to some stdout window or something. Sorry, i've never done it, nor am I sure about it. You might have more luck if you try asking on StackOverflow or the MSDN forums.
Feb 27, 2009 at 10:34 AM
Well, no, but because I'm using the .dll and not the msbuild task. I had made a little c# httphandler that after you supply the first js file, it scans that file for @include directives and starts adding the files recursively. After the process is finished, I pack the resulting js file and write to disk.

I want to access the verbose log output (write to another file, maybe js_filename.log) so I can trace down any leftover variables, etc.

Mar 3, 2009 at 1:50 AM
Hi CheloXL.

i've updated the code to now do what you want. Previously, any verbose information was dumped to the Console only. Now, I've added a StringCollection which contains a list of warnings (in the order they appear). This data is available through the ErrorMessages property on a JavaScriptCompressor instance object.

        public void CompressFull_CodePlex48610Test()
            string javascript = File.ReadAllText("jquery-1.3.1.js");

            JavaScriptCompressor javaScriptCompressor = new JavaScriptCompressor(javascript);
            string compressedJavascript = javaScriptCompressor.Compress();
            Assert.IsTrue(javascript.Length > compressedJavascript.Length);

            // Now, check to see that we have some error logging stuff.
            Assert.IsTrue(javaScriptCompressor.CustomErrorReporter.ErrorMessages.Count > 0);

Notice how i create an instance of the javascript compressor. I then Compress my shiz and finally, i check to see if the ErrorMessages property has some items in it. It will never be null, btw.

I have NOT put up a new build, so can u download the source code and compile yourself? if not, just say so and i'll put up a release and/or email you the latest bin's.

Finally, please tell me if this is what you wanted, etc and if it helps.

Cheers :)
Mar 3, 2009 at 5:19 PM

I can compile it from the sources, do not worry. And that's just what I needed, thank you a lot!.

Mar 3, 2009 at 9:28 PM
Absolute pleasure CheloXL :)

I would love it if you could post your results here .. meaning .. if it worked and you're happy or there's something missing, etc.

cheer :)