Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I save NAnt log output to a file?

Tags:

logging

nant

In my build script how can I set a destination for NAnt's log messages?

Idealy I'd like to just specify a file path. Then, on each build, NAnt would overwrite this file's contents with its message output.

like image 464
Dane O'Connor Avatar asked Apr 26 '09 18:04

Dane O'Connor


1 Answers

You can use NANT Loggers and Listeners for that. One option is to pass a logfile parameter to the command. This file is overwritten on every execution.

You could have a batch file that calls NAnt for each build file and corresponding output.

NAnt.exe -build:[build file for PROJ1] -logfile:c:\temp\BuildOutput1.txt
NAnt.exe -build:[build file for PROJ2] -logfile:c:\temp\BuildOutput2.txt
.
.

I would suggest you look into at a Continuous Integration app, like CruiseControl.NET if you haven't already done so.

like image 85
Jose Basilio Avatar answered Sep 30 '22 08:09

Jose Basilio