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
Public method 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.
Public method AdminTraceLogger(TraceLevel) Initializes a new instance of the AdminTraceLogger class.

Top

Properties

  Name Description
Public propertyStatic member Default The default instance of the AdminTraceLogger.
Public property TraceLevel Gets the TraceLevel of this logger.

Top

Methods

  Name Description
Public method 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.)
Public method 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...
Public method 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...
Public method Enter
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Error(Exception) Formats an exception and writes it as an error message to the trace.
Public method Error(String) Writes an error message to the trace.
Public method Error(String, array<Object[]) Writes an error message to the trace.
Public method Exit
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetLifetimeService Security Critical. Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Heading Writes a heading lines to the trace.
Public method Heading2 Writes a heading lines to the trace.
Public method Info(String) Writes an informational message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Info or TraceLevel.Verbose.
Public method 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.
Public method InitializeLifetimeService Security Critical. Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public method 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
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Verbose(String) Writes a verbose message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Verbose.
Public method Verbose(String, array<Object[]) Writes a verbose message to the trace, provided that TraceLevel of this logger is set to TraceLevel.Verbose.
Public method 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.
Public method 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.
Public method 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.
Public method 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.
Protected method 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.

See Also

Reference

Microsoft.TeamFoundation.Common Namespace