Ads API .NET library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Google.Api.Ads.Common.Util.TraceUtilities Class Reference

Provides utility methods to write to Trace stream. More...

Static Public Member Functions

static TraceSource GetSource (string sourceName)
 Gets a Trace source by name. More...
 
static void WriteDeprecationWarnings (string message)
 Writes the deprecation warnings. More...
 
static void WriteGeneralWarnings (string message)
 Writes the general warnings. More...
 
static void WriteGeneralErrors (string message)
 Writes the general errors. More...
 
static void WriteDetailedRequestLogs (string message, Boolean isError)
 Writes detailed HTTP request logs. More...
 
static void WriteSummaryRequestLogs (string message, Boolean isError)
 Writes the summarized HTTP request logs. More...
 
static void Configure (string source, System.Diagnostics.TraceListener traceListener, SourceLevels levels)
 Configures the specified trace source. More...
 
static void Configure (string source, TextWriter textWriter, SourceLevels levels)
 Configures the specified trace source. More...
 
static void Configure (string source, string filePath, SourceLevels levels)
 Configures the specified trace source to write to a file. More...
 

Public Attributes

const string DEPRECATION_MESSAGES_SOURCE = "AdsClientLibs.DeprecationMessages"
 Trace source for deprecation messages. More...
 
const string GENERAL_WARNING_MESSAGES_SOURCE
 Trace source for general warning messages. More...
 
const string DETAILED_REQUEST_LOGS_SOURCE = "AdsClientLibs.DetailedRequestLogs"
 Trace source for detailed HTTP request logs. More...
 
const string SUMMARY_REQUEST_LOGS_SOURCE = "AdsClientLibs.SummaryRequestLogs"
 Trace source for summarized HTTP request logs. More...
 

Detailed Description

Provides utility methods to write to Trace stream.

Member Function Documentation

static void Google.Api.Ads.Common.Util.TraceUtilities.Configure ( string  source,
System.Diagnostics.TraceListener  traceListener,
SourceLevels  levels 
)
inlinestatic

Configures the specified trace source.

Parameters
sourceThe trace source.
traceListenerThe trace listener.
levelsThe source levels.
static void Google.Api.Ads.Common.Util.TraceUtilities.Configure ( string  source,
TextWriter  textWriter,
SourceLevels  levels 
)
inlinestatic

Configures the specified trace source.

Parameters
sourceThe trace source.
textWriterThe text writer.
levelsThe source levels.
static void Google.Api.Ads.Common.Util.TraceUtilities.Configure ( string  source,
string  filePath,
SourceLevels  levels 
)
inlinestatic

Configures the specified trace source to write to a file.

Parameters
sourceThe trace source.
filePathThe file path.
levelsThe trace levels.
static TraceSource Google.Api.Ads.Common.Util.TraceUtilities.GetSource ( string  sourceName)
inlinestatic

Gets a Trace source by name.

Parameters
sourceNameName of the Trace source.
Returns
The trace source.
Exceptions
ArgumentExceptionThrown if the trace source is unknown.
static void Google.Api.Ads.Common.Util.TraceUtilities.WriteDeprecationWarnings ( string  message)
inlinestatic

Writes the deprecation warnings.

Parameters
messageThe message.

The trace levels may be controlled from App.config by setting the level for AdsClientLibs.DeprecationMessages trace switch.

static void Google.Api.Ads.Common.Util.TraceUtilities.WriteDetailedRequestLogs ( string  message,
Boolean  isError 
)
inlinestatic

Writes detailed HTTP request logs.

Parameters
messageThe HTTP request logs.
isErrorIndicates whether or not these are error logs.

The trace levels may be controlled from App.config by setting the level for AdsClientLibs.DetailedRequestLogs trace switch.

static void Google.Api.Ads.Common.Util.TraceUtilities.WriteGeneralErrors ( string  message)
inlinestatic

Writes the general errors.

Parameters
messageThe message.

The trace levels may be controlled from App.config by setting the level for AdsClientLibs.GeneralWarningMessages trace switch.

static void Google.Api.Ads.Common.Util.TraceUtilities.WriteGeneralWarnings ( string  message)
inlinestatic

Writes the general warnings.

Parameters
messageThe message.

The trace levels may be controlled from App.config by setting the level for AdsClientLibs.GeneralWarningMessages trace switch.

static void Google.Api.Ads.Common.Util.TraceUtilities.WriteSummaryRequestLogs ( string  message,
Boolean  isError 
)
inlinestatic

Writes the summarized HTTP request logs.

Parameters
messageThe summarized HTTP request logs.
isErrorIndicates whether or not these are error logs.

The trace levels may be controlled from App.config by setting the level for AdsClientLibs.SummaryRequestLogs trace switch.

Member Data Documentation

const string Google.Api.Ads.Common.Util.TraceUtilities.DEPRECATION_MESSAGES_SOURCE = "AdsClientLibs.DeprecationMessages"

Trace source for deprecation messages.

const string Google.Api.Ads.Common.Util.TraceUtilities.DETAILED_REQUEST_LOGS_SOURCE = "AdsClientLibs.DetailedRequestLogs"

Trace source for detailed HTTP request logs.

const string Google.Api.Ads.Common.Util.TraceUtilities.GENERAL_WARNING_MESSAGES_SOURCE
Initial value:
=
"AdsClientLibs.GeneralWarningMessages"

Trace source for general warning messages.

const string Google.Api.Ads.Common.Util.TraceUtilities.SUMMARY_REQUEST_LOGS_SOURCE = "AdsClientLibs.SummaryRequestLogs"

Trace source for summarized HTTP request logs.


The documentation for this class was generated from the following file: