C# Class NHibernate.AdoNet.Util.SqlStatementLogger

Centralize logging handling for SQL statements.
Exibir arquivo Open project: nhibernate/nhibernate-core Class Usage Examples

Public Methods

Method Description
DetermineActualStyle ( NHibernate.AdoNet.Util.FormatStyle style ) : NHibernate.AdoNet.Util.FormatStyle
GetCommandLineWithParameters ( IDbCommand command ) : string
GetParameterLoggableValue ( IDataParameter parameter ) : string
LogBatchCommand ( string batchCommand ) : void
LogCommand ( IDbCommand command, NHibernate.AdoNet.Util.FormatStyle style ) : void

Log a IDbCommand.

LogCommand ( string message, IDbCommand command, NHibernate.AdoNet.Util.FormatStyle style ) : void

Log a IDbCommand.

SqlStatementLogger ( ) : System

Constructs a new SqlStatementLogger instance.

SqlStatementLogger ( bool logToStdout, bool formatSql ) : System

Constructs a new SqlStatementLogger instance.

Private Methods

Method Description
GetBufferAsHexString ( byte buffer ) : string
GetParameterLogableValue ( IDataParameter parameter ) : string
GetParameterLoggableType ( IDataParameter dataParameter ) : string
IsStringType ( DbType dbType ) : bool
TruncateWithEllipsis ( string source, int length ) : string

Method Details

DetermineActualStyle() public method

public DetermineActualStyle ( NHibernate.AdoNet.Util.FormatStyle style ) : NHibernate.AdoNet.Util.FormatStyle
style NHibernate.AdoNet.Util.FormatStyle
return NHibernate.AdoNet.Util.FormatStyle

GetCommandLineWithParameters() public method

public GetCommandLineWithParameters ( IDbCommand command ) : string
command IDbCommand
return string

GetParameterLoggableValue() public method

public GetParameterLoggableValue ( IDataParameter parameter ) : string
parameter IDataParameter
return string

LogBatchCommand() public method

public LogBatchCommand ( string batchCommand ) : void
batchCommand string
return void

LogCommand() public method

Log a IDbCommand.
public LogCommand ( IDbCommand command, NHibernate.AdoNet.Util.FormatStyle style ) : void
command IDbCommand The SQL statement.
style NHibernate.AdoNet.Util.FormatStyle The requested formatting style.
return void

LogCommand() public method

Log a IDbCommand.
public LogCommand ( string message, IDbCommand command, NHibernate.AdoNet.Util.FormatStyle style ) : void
message string Title
command IDbCommand The SQL statement.
style NHibernate.AdoNet.Util.FormatStyle The requested formatting style.
return void

SqlStatementLogger() public method

Constructs a new SqlStatementLogger instance.
public SqlStatementLogger ( ) : System
return System

SqlStatementLogger() public method

Constructs a new SqlStatementLogger instance.
public SqlStatementLogger ( bool logToStdout, bool formatSql ) : System
logToStdout bool Should we log to STDOUT in addition to our internal logger.
formatSql bool Should we format SQL ('prettify') prior to logging.
return System