C# 클래스 System.Data.Entity.Infrastructure.Interception.DatabaseLogger

A simple logger for logging SQL and other database operations to the console or a file. A logger can be registered in code or in the application's web.config /app.config file.
상속: IDisposable, IDbConfigurationInterceptor
파일 보기 프로젝트 열기: dotnet/ef6tools 1 사용 예제들

공개 메소드들

메소드 설명
DatabaseLogger ( ) : System.Data.Entity.Infrastructure.DependencyResolution

Creates a new logger that will send log output to the console.

DatabaseLogger ( string path ) : System.Data.Entity.Infrastructure.DependencyResolution

Creates a new logger that will send log output to a file. If the file already exists then it is overwritten.

Dispose ( ) : void

Stops logging and closes the underlying file if output is being written to a file.

StartLogging ( ) : void

Starts logging. This method is a no-op if logging is already started.

StopLogging ( ) : void

Stops logging. This method is a no-op if logging is not started.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Stops logging and closes the underlying file if output is being written to a file.

비공개 메소드들

메소드 설명
DatabaseLogger ( string path, bool append ) : System.Data.Entity.Infrastructure.DependencyResolution
IDbConfigurationInterceptor ( DbConfigurationLoadedEventArgs loadedEventArgs, System.Data.Entity.Infrastructure.Interception.DbConfigurationInterceptionContext interceptionContext ) : void
StartLogging ( IDbDependencyResolver resolver ) : void
WriteThreadSafe ( string value ) : void

메소드 상세

DatabaseLogger() 공개 메소드

Creates a new logger that will send log output to the console.
public DatabaseLogger ( ) : System.Data.Entity.Infrastructure.DependencyResolution
리턴 System.Data.Entity.Infrastructure.DependencyResolution

DatabaseLogger() 공개 메소드

Creates a new logger that will send log output to a file. If the file already exists then it is overwritten.
public DatabaseLogger ( string path ) : System.Data.Entity.Infrastructure.DependencyResolution
path string A path to the file to which log output will be written.
리턴 System.Data.Entity.Infrastructure.DependencyResolution

Dispose() 공개 메소드

Stops logging and closes the underlying file if output is being written to a file.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Stops logging and closes the underlying file if output is being written to a file.
protected Dispose ( bool disposing ) : void
disposing bool /// True to release both managed and unmanaged resources; False to release only unmanaged resources. ///
리턴 void

StartLogging() 공개 메소드

Starts logging. This method is a no-op if logging is already started.
public StartLogging ( ) : void
리턴 void

StopLogging() 공개 메소드

Stops logging. This method is a no-op if logging is not started.
public StopLogging ( ) : void
리턴 void