Partager via


FileLogger Class

Definition

A specialization of the ConsoleLogger that logs to a file instead of the console. The output in terms of what is written and how it looks is identical. For example you can log verbosely to a file using the FileLogger while simultaneously logging only high priority events to the console using a ConsoleLogger.

public ref class FileLogger : Microsoft::Build::Logging::ConsoleLogger
public class FileLogger : Microsoft.Build.Logging.ConsoleLogger
type FileLogger = class
    inherit ConsoleLogger
Public Class FileLogger
Inherits ConsoleLogger
Inheritance
FileLogger

Remarks

It's unfortunate that this is derived from ConsoleLogger, which is itself a facade; it makes things more complex -- for example, there is parameter parsing in this class, plus in BaseConsoleLogger. However we have to derive FileLogger from ConsoleLogger because it shipped that way in Whidbey.

Constructors

FileLogger()

Default constructor.

Properties

Parameters

A semi-colon delimited list of "key[=value]" parameter pairs.

(Inherited from ConsoleLogger)
ShowSummary

Suppresses the display of error and warnings summary.

(Inherited from ConsoleLogger)
SkipProjectStartedText

Suppresses the display of project headers. Project headers are displayed by default unless this property is set.

(Inherited from ConsoleLogger)
Verbosity

Gets or sets the level of detail to show in the event log.

(Inherited from ConsoleLogger)
WriteHandler

Provide access to the write hander delegate so that it can be redirected if necessary (e.g. to a file)

(Inherited from ConsoleLogger)

Methods

ApplyParameter(String, String)

Apply a parameter. NOTE: This method was public by accident in Whidbey, so it cannot be made internal now. It has no good reason for being public.

(Inherited from ConsoleLogger)
BuildFinishedHandler(Object, BuildFinishedEventArgs)

Handler for build finished events

(Inherited from ConsoleLogger)
BuildStartedHandler(Object, BuildStartedEventArgs)

Handler for build started events

(Inherited from ConsoleLogger)
CustomEventHandler(Object, CustomBuildEventArgs)

Prints a custom event

(Inherited from ConsoleLogger)
ErrorHandler(Object, BuildErrorEventArgs)

Prints an error event

(Inherited from ConsoleLogger)
Initialize(IEventSource, Int32)

Multiproc aware initialization

Initialize(IEventSource)

Signs up the console file logger for all build events. This is the backward-compatible overload.

MessageHandler(Object, BuildMessageEventArgs)

Prints a message event

(Inherited from ConsoleLogger)
ProjectFinishedHandler(Object, ProjectFinishedEventArgs)

Handler for project finished events

(Inherited from ConsoleLogger)
ProjectStartedHandler(Object, ProjectStartedEventArgs)

Handler for project started events

(Inherited from ConsoleLogger)
Shutdown()

Shutdown method implementation of ILogger - we need to flush and close our logfile.

TargetFinishedHandler(Object, TargetFinishedEventArgs)

Handler for target finished events

(Inherited from ConsoleLogger)
TargetStartedHandler(Object, TargetStartedEventArgs)

Handler for target started events

(Inherited from ConsoleLogger)
TaskFinishedHandler(Object, TaskFinishedEventArgs)

Handler for task finished events

(Inherited from ConsoleLogger)
TaskStartedHandler(Object, TaskStartedEventArgs)

Handler for task started events

(Inherited from ConsoleLogger)
WarningHandler(Object, BuildWarningEventArgs)

Prints a warning event

(Inherited from ConsoleLogger)

Applies to