NAnt SDK Documentation - v0.92

ConsoleDriver.CreateLogger Method 

Dynamically constructs an IBuildLogger instance of the class specified.

[Visual Basic]
<ReflectionPermission(Flags:=ReflectionPermissionFlag.NoFlags, TypeInformation:=False, MemberAccess:=False, ReflectionEmit:=False, RestrictedMemberAccess:=False, Action:=SecurityAction.Demand, Unrestricted:=False)>
Public Shared Function CreateLogger( _
   ByVal typeName As String _
) As IBuildLogger
[C#]
[ReflectionPermission(Flags=ReflectionPermissionFlag.NoFlags, TypeInformation=False, MemberAccess=False, ReflectionEmit=False, RestrictedMemberAccess=False, Action=SecurityAction.Demand, Unrestricted=False)]
public static IBuildLogger CreateLogger(
   string typeName
);

Parameters

typeName
The fully qualified name of the logger that should be instantiated.

Remarks

At this point, only looks in the assembly where IBuildLogger is defined.

Exceptions

Exception TypeCondition
TypeLoadExceptionType typeName could not be loaded.
ArgumentExceptiontypeName does not implement IBuildLogger.

See Also

ConsoleDriver Class | NAnt.Core Namespace