AdminTraceLogger Class
A logger that provides a configurable via registry tracing, which is good for setup including many processes (avoid editing many config files) and processes which we don't own (mmc) where we're hosted.
Inheritance Hierarchy
System.Object
System.MarshalByRefObject
Microsoft.TeamFoundation.Common.AdminTraceLogger
Namespace: Microsoft.TeamFoundation.Common
Assembly: Microsoft.TeamFoundation.Common (in Microsoft.TeamFoundation.Common.dll)
Syntax
'Declaration
Public Class AdminTraceLogger _
Inherits MarshalByRefObject _
Implements ITFLogger
public class AdminTraceLogger : MarshalByRefObject,
ITFLogger
public ref class AdminTraceLogger : public MarshalByRefObject,
ITFLogger
type AdminTraceLogger =
class
inherit MarshalByRefObject
interface ITFLogger
end
public class AdminTraceLogger extends MarshalByRefObject implements ITFLogger
The AdminTraceLogger type exposes the following members.
Constructors
Name | Description | |
---|---|---|
AdminTraceLogger() | Initializes a new instance of the AdminTraceLogger class. This constructors reads TraceLevel from the the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TeamFoundationServer\11.0\Admin\TraceLevel. | |
AdminTraceLogger(TraceLevel) | Initializes a new instance of the AdminTraceLogger class. |
Top
Properties
Name | Description | |
---|---|---|
Default | The default instance of the AdminTraceLogger. | |
TraceLevel | Gets the TraceLevel of this logger. |
Top
Methods
Name | Description | |
---|---|---|
CreateObjRef | Security Critical. Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
Debug(String) | Writes debug message to the trace. This constrained to dev debugging, so it's safe if you want to trace a password etc... | |
Debug(String, array<Object[]) | Writes debug message to the trace. This constrained to dev debugging, so it's safe if you want to trace a password etc... | |
Enter | ||
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Error(Exception) | Formats an exception and writes it as an error message to the trace. | |
Error(String) | Writes an error message to the trace. | |
Error(String, array<Object[]) | Writes an error message to the trace. | |
Exit | ||
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetLifetimeService | Security Critical. Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Heading | Writes a heading lines to the trace. | |
Heading2 | Writes a heading lines to the trace. | |
Info(String) | Writes an informational message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Info or TraceLevel.Verbose. | |
Info(String, array<Object[]) | Writes an informational message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Info or TraceLevel.Verbose. | |
InitializeLifetimeService | Security Critical. Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
RegisterPassword | All Admin logging and tracing comes through the trace class. We will error if (1) the TFS_SCAN_PASSWORDS envvar is set and (2) it's debug This is expensive to enable but good for testing that passwords don't end up in a flight recorder trace or log Debug only so we don't care about passwords not being secure strings | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Verbose(String) | Writes a verbose message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Verbose. | |
Verbose(String, array<Object[]) | Writes a verbose message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Verbose. | |
Warning(Exception) | Formats an exception and writes it as a warning message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Warning, TraceLevel.Info or TraceLevel.Verbose. | |
Warning(String) | Writes a warning message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Warning, TraceLevel.Info, or TraceLevel.Verbose. | |
Warning(String, array<Object[]) | Writes a warning message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Warning, TraceLevel.Info, or TraceLevel.Verbose. | |
WriteLine(TraceLevel, String) | Writes a message to the trace, provided that traceLevel passed as first argument is is not lower than the logger TraceLevel. In debug build, this method can also ensure that output does not contain passwords. | |
WriteLine(TraceLevel, String, array<Object[]) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.