This logger will accept a log4net config file as an input property from the command line. The property name is log4netConfigFile.
Here is a sample of how to use the logger when building your applications:
msbuild PROJ_TO_BUILD.proj /l:SedoLogger,PATH_TO_INSTALL_LOCATION\Sedodream.MSBuild.Loggers.dll;log4netConfigFile=log4net.config

In the 3.1 release the installer will create the environment variable SEDO_BIN which points to the install location of the Sedodream items. Because of this we can use the modified statement below:
msbuild PROJ_TO_BUILD.proj /l:SedoLogger,"%SEDO_BIN%\Sedodream.MSBuild.Loggers.dll";log4netConfigFile=log4net.config

If not config file property is provided then it will search for a config file named log4net.msbuild.xml in the directory that the build is executing.

Here is a sample log4net config file you can use to write the log to a file:
<?xml version="1.0" encoding="utf-8" ?>
<log4net debug="true">

  <appender name="FileAppender" type="log4net.Appender.FileAppender">
    <file value="C:\Data\Development\My Code\Source\Trunk\Sedodream.Sudoku\log-file.txt" />

    <layout type="log4net.Layout.PatternLayout">
      <appendToFile value="false" />
      <conversionPattern value="%message" />

    <level value="ALL" />
    <appender-ref ref="FileAppender" />

Related items

Name Description
log4net log4net
log4net viewer log4net viewer

Last edited Jun 27, 2007 at 4:36 AM by sayed_hashimi, version 2


Mayday21 May 4, 2009 at 1:46 PM 
When trying to execute msbuild with SedoLogger I got an error:

MSBUILD : error MSB1020: The logger was not found. Check the following: 1.) The logger name specified is the same as the name of the logger class. 2.) The logger class is "public" and implements the Microsoft.Build.Framework.ILogger interface. 3.) The path to the logger assembly is correct, or the logger can be loaded using only the assembly name provided. Switch: SedoLogger,Sedodream.MSBuild.Loggers.dll;log4netConfigFile=log4net.msbuild.xml

log4net.msbuild.xml and Sedodream.MSBuild.Loggers.dll are located in the same directory. Calling another logger like XmlLogger is successfully.