C# Class Revit.SDK.Samples.CancelSave.CS.LogManager

One log file will be created by this class for tracking events raise.
Exibir arquivo Open project: AMEE/revit

Public Methods

Method Description
LogFinalize ( ) : void

Finalize and close the output log.

WriteLog ( EventArgs args, Document doc ) : void

Write log to file: which event occurred in which document.

WriteLog ( string message ) : void

Write specified message into log file.

Private Methods

Method Description
GetEventName ( Type type ) : string

Get event name from its EventArgs, without namespace prefix

LogManager ( ) : System

Static constructor which creates a log file.

TitleNoExt ( String orgTitle ) : string

This method will remove the extension name of file name(if have). Document.Title will return title of project depends on OS setting: If we choose show extension name by IE:Tools\Folder Options, then the title will end with accordingly extension name. If we don't show extension, the Document.Title will only return file name without extension.

Method Details

LogFinalize() public static method

Finalize and close the output log.
public static LogFinalize ( ) : void
return void

WriteLog() public static method

Write log to file: which event occurred in which document.
public static WriteLog ( EventArgs args, Document doc ) : void
args System.EventArgs Event arguments that contains the event data.
doc Document document in which the event is occur.
return void

WriteLog() public static method

Write specified message into log file.
public static WriteLog ( string message ) : void
message string the message which will be written into the log file.
return void