|
static void | ApplySchemaChanges (this LogBase log) |
|
static void | AwaitingDbLink (this LogBase log, IDbConnection connection) |
|
static void | DbLinkDown (this LogBase log) |
|
static void | DbLinkError (this LogBase log, Exception e) |
|
static void | DbLinkUp (this LogBase log) |
|
static void | SchemaChangesApplied (this LogBase log, string version) |
|
static void | SchemaUpdated (this LogBase log, string version) |
|
static void | SchemaUpdateError (this LogBase log, Exception e) |
|
static void | SchemaUpToDate (this LogBase log) |
|
static void | SchemaVersionError (this LogBase log, int database, int application) |
|
static void | VersionTableCreated (this LogBase log) |
|
static void | VersionTableCreateError (this LogBase log, Exception e) |
|
static void | VersionTableFetchError (this LogBase log, Exception e) |
|
static void | VersionTableInsertError (this LogBase log, Exception e) |
|
static void | VersionTableParamError (this LogBase log) |
|
static void | VersionTableUpdateError (this LogBase log, Exception e) |
|
Definition at line 27 of file LogExtensions.cs.
static void Ntp.Data.Log.LogExtensions.ApplySchemaChanges |
( |
this LogBase |
log | ) |
|
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.AwaitingDbLink |
( |
this LogBase |
log, |
|
|
IDbConnection |
connection |
|
) |
| |
|
inlinestaticpackage |
Definition at line 55 of file LogExtensions.cs.
References Ntp.Common.Log.LogBase.WriteLine().
58 "Waiting for database link.",
62 $
"Database connection timeout is {connection.ConnectionTimeout} seconds.",
66 "DATABASE CONNECTION STRING COULD CONTAIN SENSITIVE INFORMATION.",
70 $
"DATABASE CONNECTION STRING IS [{connection.ConnectionString}]",
static void Ntp.Data.Log.LogExtensions.DbLinkDown |
( |
this LogBase |
log | ) |
|
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.DbLinkError |
( |
this LogBase |
log, |
|
|
Exception |
e |
|
) |
| |
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.DbLinkUp |
( |
this LogBase |
log | ) |
|
|
inlinestaticpackage |
static string Ntp.Data.Log.LogExtensions.GetDbDataParameterValue |
( |
IDataParameter |
p | ) |
|
|
inlinestaticprivate |
Definition at line 165 of file LogExtensions.cs.
169 case DbType.AnsiString:
170 case DbType.AnsiStringFixedLength:
173 case DbType.StringFixedLength:
175 return $
"\'{p.Value.ToString().Replace("'", "''")}\'"; 177 return p.Value.ToString(); 179 case DbType.DateTime: 180 return $"\'{Convert.ToDateTime(p.Value).ToString("yyyy-MM-dd HH:mm:ss")}\'"; 181 case DbType.DateTime2: 182 case DbType.DateTimeOffset: 183 return p.Value.ToString(); 185 return p.Value.ToString(); 189 return Convert.ToBoolean(p.Value) ? "1" : "0"; 198 return p.Value.ToString(); 202 case DbType.Currency: 203 case DbType.VarNumeric: 204 return p.Value.ToString(); 206 return p.Value.ToString();
static void Ntp.Data.Log.LogExtensions.SchemaChangesApplied |
( |
this LogBase |
log, |
|
|
string |
version |
|
) |
| |
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.SchemaUpdated |
( |
this LogBase |
log, |
|
|
string |
version |
|
) |
| |
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.SchemaUpdateError |
( |
this LogBase |
log, |
|
|
Exception |
e |
|
) |
| |
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.SchemaUpToDate |
( |
this LogBase |
log | ) |
|
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.SchemaVersionError |
( |
this LogBase |
log, |
|
|
int |
database, |
|
|
int |
application |
|
) |
| |
|
inlinestaticpackage |
Definition at line 110 of file LogExtensions.cs.
References Ntp.Common.Log.LogBase.WriteLine().
114 log.WriteLine(
"Database version is -1. Did you set 'Create Yes' in configuration ?",
Severity.Notice);
118 $
"Application version is {application} but database version is {database}.",
121 if (database > application)
123 log.WriteLine(
"Update NTP Analyzer to resolve this problem.",
Severity.Info);
125 else if (database < application)
127 log.WriteLine(
"Upgrade your database to resolve this problem.",
Severity.Info);
static void Ntp.Data.Log.LogExtensions.SqlExecute |
( |
this LogBase |
log, |
|
|
string |
sql |
|
) |
| |
|
inlinestatic |
static void Ntp.Data.Log.LogExtensions.SqlExecute |
( |
this LogBase |
log, |
|
|
string |
sql, |
|
|
IDataParameterCollection |
parameters |
|
) |
| |
|
inlinestatic |
Definition at line 34 of file LogExtensions.cs.
36 string query = $
"{sql} ";
37 foreach (IDataParameter parameter
in parameters)
39 query = query.Replace($
"{parameter.ParameterName} ", $
"{GetDbDataParameterValue(parameter)} ");
40 query = query.Replace($
"{parameter.ParameterName},", $
"{GetDbDataParameterValue(parameter)},");
41 query = query.Replace($
"{parameter.ParameterName};", $
"{GetDbDataParameterValue(parameter)};");
42 query = query.Replace($
"{parameter.ParameterName})", $
"{GetDbDataParameterValue(parameter)})");
45 log.WriteLine(query.Trim(),
Severity.Trace);
static void Ntp.Data.Log.LogExtensions.VersionTableCreated |
( |
this LogBase |
log | ) |
|
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.VersionTableCreateError |
( |
this LogBase |
log, |
|
|
Exception |
e |
|
) |
| |
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.VersionTableFetchError |
( |
this LogBase |
log, |
|
|
Exception |
e |
|
) |
| |
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.VersionTableInsertError |
( |
this LogBase |
log, |
|
|
Exception |
e |
|
) |
| |
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.VersionTableParamError |
( |
this LogBase |
log | ) |
|
|
inlinestaticpackage |
static void Ntp.Data.Log.LogExtensions.VersionTableUpdateError |
( |
this LogBase |
log, |
|
|
Exception |
e |
|
) |
| |
|
inlinestaticpackage |
The documentation for this class was generated from the following file: