Class Logging
Logging variables and functions for DB Addin
Inheritance
Namespace: DBaddin
Assembly: DBaddin.dll
Syntax
public class Logging
Fields
| Improve this Doc View SourceDebugAddin
Debug the Addin: write trace messages
Declaration
public static bool DebugAddin
Field Value
Description |
---|
nonInteractive
for DBMapper invocations by execDBModif, this is set to true, avoiding MsgBox
Declaration
public static bool nonInteractive
Field Value
Description |
---|
nonInteractiveErrMsgs
collect non interactive error messages here
Declaration
public static string nonInteractiveErrMsgs
Field Value
Description |
---|
theLogDisplaySource
the LogDisplay (Diagnostic Display) log source
Declaration
public static TraceSource theLogDisplaySource
Field Value
Description |
---|
theLogFileSource
the Text-file log source
Declaration
public static TraceSource theLogFileSource
Field Value
Description |
---|
WarningIssued
set to true if warning was issued, this flag indicates that the log button should get an exclamation sign
Declaration
public static bool WarningIssued
Field Value
Description |
---|
Methods
| Improve this Doc View SourceLogError(String)
Logs error messages
Declaration
public static void LogError(string LogMessage)
Parameters
Name | Description |
---|---|
LogMessage | the message to be logged |
LogInfo(String)
Logs informational messages
Declaration
public static void LogInfo(string LogMessage)
Parameters
Name | Description |
---|---|
LogMessage | the message to be logged |
LogWarn(String)
Logs warning messages
Declaration
public static void LogWarn(string LogMessage)
Parameters
Name | Description |
---|---|
LogMessage | the message to be logged |
QuestionMsg(String, MsgBoxStyle, String, MsgBoxStyle)
ask User (default OKCancel) and log as warning if Critical Or Exclamation (logged errors would pop up the trace information window)
Declaration
public static MsgBoxResult QuestionMsg(string theMessage, MsgBoxStyle questionType = MsgBoxStyle.OkCancel, string questionTitle = "DBAddin Question", MsgBoxStyle msgboxIcon = MsgBoxStyle.Question)
Parameters
Name | Description |
---|---|
theMessage | the question to be shown/logged |
questionType | optionally pass question box type, default MsgBoxStyle.OKCancel |
questionTitle | optionally pass a title for the msgbox instead of default DBAddin Question |
msgboxIcon | optionally pass a different Msgbox icon (style) instead of default MsgBoxStyle.Question |
Returns
Description |
---|
choice as MsgBoxResult (Yes, No, OK, Cancel...) |
UserMsg(String, String, MsgBoxStyle)
show message to User (default Error message) and log as warning if Critical Or Exclamation (logged errors would pop up the trace information window)
Declaration
public static void UserMsg(string LogMessage, string errTitle = "DBAddin Error", MsgBoxStyle msgboxIcon = MsgBoxStyle.Critical)
Parameters
Name | Description |
---|---|
LogMessage | the message to be shown/logged |
errTitle | optionally pass a title for the msgbox instead of default DBAddin Error |
msgboxIcon | optionally pass a different Msgbox icon (style) instead of default MsgBoxStyle.Critical |