EventSchemaTraceListener Construtores

Definição

Inicializa uma nova instância da classe EventSchemaTraceListener.Initializes a new instance of the EventSchemaTraceListener class.

Sobrecargas

EventSchemaTraceListener(String)

Inicializa uma nova instância da classe EventSchemaTraceListener usando o arquivo especificado como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class, using the specified file as the recipient of debugging and tracing output.

EventSchemaTraceListener(String, String)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome especificado usando o arquivo indicado como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name, using the specified file as the recipient of debugging and tracing output.

EventSchemaTraceListener(String, String, Int32)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome e o tamanho do buffer especificados usando o arquivo indicado como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name and specified buffer size, using the specified file as the recipient of debugging and tracing output.

EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome e o tamanho do buffer especificados usando o arquivo indicado com a política de retenção de log fornecido como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name and specified buffer size, using the specified file with the specified log retention policy as the recipient of the debugging and tracing output.

EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption, Int64)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome e o tamanho do buffer especificados usando o arquivo indicado com a política de retenção de log e o tamanho máximo fornecidos como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name and specified buffer size, using the specified file with the specified log retention policy and maximum size as the recipient of the debugging and tracing output.

EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption, Int64, Int32)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome e o tamanho do buffer especificados usando o arquivo indicado com a política de retenção de log, o tamanho máximo e a contagem de arquivos fornecidos como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name and specified buffer size, using the specified file with the specified log retention policy, maximum size, and file count as the recipient of the debugging and tracing output.

EventSchemaTraceListener(String)

Inicializa uma nova instância da classe EventSchemaTraceListener usando o arquivo especificado como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class, using the specified file as the recipient of debugging and tracing output.

public:
 EventSchemaTraceListener(System::String ^ fileName);
public EventSchemaTraceListener (string fileName);
new System.Diagnostics.EventSchemaTraceListener : string -> System.Diagnostics.EventSchemaTraceListener
Public Sub New (fileName As String)

Parâmetros

fileName
String

O caminho do arquivo de log.The path for the log file.

Exemplos

O exemplo de código a seguir demonstra como usar o EventSchemaTraceListener.EventSchemaTraceListener(String) Construtor.The following code example demonstrates how to use the EventSchemaTraceListener.EventSchemaTraceListener(String) constructor.

TraceSource ts = new TraceSource("TestSource");
ts.Listeners.Add(new EventSchemaTraceListener("TraceOutput.xml"));
Dim ts As New TraceSource("TestSource")
ts.Listeners.Add(New EventSchemaTraceListener("TraceOutput.xml"))

Comentários

Por padrão, um arquivo de tamanho irrestrito é registrado.By default, one file of unrestricted size is logged.

Aplica-se a

EventSchemaTraceListener(String, String)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome especificado usando o arquivo indicado como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name, using the specified file as the recipient of debugging and tracing output.

public:
 EventSchemaTraceListener(System::String ^ fileName, System::String ^ name);
public EventSchemaTraceListener (string fileName, string name);
new System.Diagnostics.EventSchemaTraceListener : string * string -> System.Diagnostics.EventSchemaTraceListener
Public Sub New (fileName As String, name As String)

Parâmetros

fileName
String

O caminho do arquivo de log.The path for the log file.

name
String

O nome do ouvinte.The name of the listener.

Exemplos

O exemplo de código a seguir demonstra como usar o EventSchemaTraceListener.EventSchemaTraceListener(String, String, Int32) Construtor.The following code example demonstrates how to use the EventSchemaTraceListener.EventSchemaTraceListener(String, String, Int32) constructor.

TraceSource ts = new TraceSource("TestSource");
ts.Listeners.Add(new EventSchemaTraceListener("TraceOutput.xml", "eventListener"));
Dim ts As New TraceSource("TestSource")
ts.Listeners.Add(New EventSchemaTraceListener("TraceOutput.xml", "eventListener"))

Aplica-se a

EventSchemaTraceListener(String, String, Int32)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome e o tamanho do buffer especificados usando o arquivo indicado como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name and specified buffer size, using the specified file as the recipient of debugging and tracing output.

public:
 EventSchemaTraceListener(System::String ^ fileName, System::String ^ name, int bufferSize);
public EventSchemaTraceListener (string fileName, string name, int bufferSize);
new System.Diagnostics.EventSchemaTraceListener : string * string * int -> System.Diagnostics.EventSchemaTraceListener
Public Sub New (fileName As String, name As String, bufferSize As Integer)

Parâmetros

fileName
String

O caminho do arquivo de log.The path for the log file.

name
String

O nome do ouvinte.The name of the listener.

bufferSize
Int32

O tamanho do buffer de saída em bytes.The size of the output buffer, in bytes.

Exemplos

O exemplo de código a seguir demonstra como usar o EventSchemaTraceListener.EventSchemaTraceListener(String, String, Int32) Construtor.The following code example demonstrates how to use the EventSchemaTraceListener.EventSchemaTraceListener(String, String, Int32) constructor.

TraceSource ts = new TraceSource("TestSource");
ts.Listeners.Add(new EventSchemaTraceListener("TraceOutput.xml", "eventListener", 65536));
Dim ts As New TraceSource("TestSource")
ts.Listeners.Add(New EventSchemaTraceListener("TraceOutput.xml", "eventListener", 65536))

Comentários

Para considerações sobre desempenho, bufferSize deve ser um múltiplo de 1024 bytes.For performance considerations, bufferSize should be a multiple of 1024 bytes.

Aplica-se a

EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome e o tamanho do buffer especificados usando o arquivo indicado com a política de retenção de log fornecido como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name and specified buffer size, using the specified file with the specified log retention policy as the recipient of the debugging and tracing output.

public:
 EventSchemaTraceListener(System::String ^ fileName, System::String ^ name, int bufferSize, System::Diagnostics::TraceLogRetentionOption logRetentionOption);
public EventSchemaTraceListener (string fileName, string name, int bufferSize, System.Diagnostics.TraceLogRetentionOption logRetentionOption);
new System.Diagnostics.EventSchemaTraceListener : string * string * int * System.Diagnostics.TraceLogRetentionOption -> System.Diagnostics.EventSchemaTraceListener
Public Sub New (fileName As String, name As String, bufferSize As Integer, logRetentionOption As TraceLogRetentionOption)

Parâmetros

fileName
String

O caminho do arquivo de log.The path for the log file.

name
String

O nome do ouvinte.The name of the listener.

bufferSize
Int32

O tamanho do buffer de saída em bytes.The size of the output buffer, in bytes.

logRetentionOption
TraceLogRetentionOption

Um dos valores de TraceLogRetentionOption.One of the TraceLogRetentionOption values.

Exemplos

O exemplo de código a seguir demonstra como usar o EventSchemaTraceListener.EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption) Construtor.The following code example demonstrates how to use the EventSchemaTraceListener.EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption) constructor.

TraceSource ts = new TraceSource("TestSource");
ts.Listeners.Add(new EventSchemaTraceListener("TraceOutput.xml", "eventListener", 65536, TraceLogRetentionOption.LimitedCircularFiles));
Dim ts As New TraceSource("TestSource")
ts.Listeners.Add(New EventSchemaTraceListener("TraceOutput.xml", "eventListener", 65536, TraceLogRetentionOption.LimitedCircularFiles))

Comentários

Para considerações sobre desempenho, bufferSize deve ser um múltiplo de 1024 bytes.For performance considerations, bufferSize should be a multiple of 1024 bytes.

Aplica-se a

EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption, Int64)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome e o tamanho do buffer especificados usando o arquivo indicado com a política de retenção de log e o tamanho máximo fornecidos como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name and specified buffer size, using the specified file with the specified log retention policy and maximum size as the recipient of the debugging and tracing output.

public:
 EventSchemaTraceListener(System::String ^ fileName, System::String ^ name, int bufferSize, System::Diagnostics::TraceLogRetentionOption logRetentionOption, long maximumFileSize);
public EventSchemaTraceListener (string fileName, string name, int bufferSize, System.Diagnostics.TraceLogRetentionOption logRetentionOption, long maximumFileSize);
new System.Diagnostics.EventSchemaTraceListener : string * string * int * System.Diagnostics.TraceLogRetentionOption * int64 -> System.Diagnostics.EventSchemaTraceListener
Public Sub New (fileName As String, name As String, bufferSize As Integer, logRetentionOption As TraceLogRetentionOption, maximumFileSize As Long)

Parâmetros

fileName
String

O caminho do arquivo de log.The path for the log file.

name
String

O nome do ouvinte.The name of the listener.

bufferSize
Int32

O tamanho do buffer de saída em bytes.The size of the output buffer, in bytes.

logRetentionOption
TraceLogRetentionOption

Um dos valores de TraceLogRetentionOption.One of the TraceLogRetentionOption values.

maximumFileSize
Int64

O tamanho do arquivo máximo, em bytes.The maximum file size, in bytes.

Exceções

maximumFileSize é um número negativo ou menor que bufferSize.maximumFileSize is a negative number or less than bufferSize.

- ou --or-

bufferSize é um número negativo.bufferSize is a negative number.

Exemplos

O exemplo de código a seguir demonstra como usar o EventSchemaTraceListener.EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption, Int64) Construtor.The following code example demonstrates how to use the EventSchemaTraceListener.EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption, Int64) constructor.

TraceSource ts = new TraceSource("TestSource");
ts.Listeners.Add(new EventSchemaTraceListener("TraceOutput.xml", "eventListener", 65536, TraceLogRetentionOption.LimitedCircularFiles, 20480000));
Dim ts As New TraceSource("TestSource")
ts.Listeners.Add(New EventSchemaTraceListener("TraceOutput.xml", "eventListener", 65536, TraceLogRetentionOption.LimitedCircularFiles, 20480000))

Comentários

Para considerações sobre desempenho bufferSize e maximumFileSize deve ser múltiplos de 1024 bytes.For performance considerations, bufferSize and maximumFileSize should be multiples of 1024 bytes. maximumFileSize Não é um valor absoluto, é um limite que pode ser excedido até o tamanho da última mensagem.maximumFileSize is not an absolute value, it is a threshold which can be exceeded up to the size of the last message.

Aplica-se a

EventSchemaTraceListener(String, String, Int32, TraceLogRetentionOption, Int64, Int32)

Inicializa uma nova instância da classe EventSchemaTraceListener com o nome e o tamanho do buffer especificados usando o arquivo indicado com a política de retenção de log, o tamanho máximo e a contagem de arquivos fornecidos como o destinatário da saída de depuração e de rastreamento.Initializes a new instance of the EventSchemaTraceListener class with the specified name and specified buffer size, using the specified file with the specified log retention policy, maximum size, and file count as the recipient of the debugging and tracing output.

public:
 EventSchemaTraceListener(System::String ^ fileName, System::String ^ name, int bufferSize, System::Diagnostics::TraceLogRetentionOption logRetentionOption, long maximumFileSize, int maximumNumberOfFiles);
public EventSchemaTraceListener (string fileName, string name, int bufferSize, System.Diagnostics.TraceLogRetentionOption logRetentionOption, long maximumFileSize, int maximumNumberOfFiles);
new System.Diagnostics.EventSchemaTraceListener : string * string * int * System.Diagnostics.TraceLogRetentionOption * int64 * int -> System.Diagnostics.EventSchemaTraceListener
Public Sub New (fileName As String, name As String, bufferSize As Integer, logRetentionOption As TraceLogRetentionOption, maximumFileSize As Long, maximumNumberOfFiles As Integer)

Parâmetros

fileName
String

O caminho do arquivo de log.The path for the log file.

name
String

O nome do ouvinte.The name of the listener.

bufferSize
Int32

O tamanho do buffer de saída em bytes.The size of the output buffer, in bytes.

logRetentionOption
TraceLogRetentionOption

Um dos valores de TraceLogRetentionOption.One of the TraceLogRetentionOption values.

maximumFileSize
Int64

O tamanho do arquivo máximo, em bytes.The maximum file size, in bytes.

maximumNumberOfFiles
Int32

O número máximo de arquivos de log de saída.The maximum number of output log files.

Exceções

maximumFileSize é um número negativo ou menor que bufferSize.maximumFileSize is a negative number or less than bufferSize.

- ou --or-

maximumNumberOfFiles é menor que -1 e logRetentionOption é LimitedSequentialFiles.maximumNumberOfFiles is less than 1, and logRetentionOption is LimitedSequentialFiles.

- ou --or-

maximumNumberOfFiles é menor que 2 e logRetentionOption é LimitedCircularFiles.maximumNumberOfFiles is less than 2, and logRetentionOption is LimitedCircularFiles.

- ou --or-

bufferSize é um número negativo.bufferSize is a negative number.

Exemplos

O exemplo de código a seguir demonstra como usar o EventSchemaTraceListener Construtor.The following code example demonstrates how to use the EventSchemaTraceListener constructor. Este exemplo de código faz parte de um exemplo maior que é fornecido para a EventSchemaTraceListener classe.This code example is part of a larger example that is provided for the EventSchemaTraceListener class.

//ts.Listeners.Add(new EventSchemaTraceListener("TraceOutput.xml", "eventListener", 65536, TraceLogRetentionOption.LimitedCircularFiles, 20480000, 2));
ts.Listeners.Add(new EventSchemaTraceListener("TraceOutput.xml", "eventListener"));
ts.Listeners.Add(New EventSchemaTraceListener("TraceOutput.xml", "eventListener", 65536, TraceLogRetentionOption.LimitedCircularFiles, 20480000, 2))

Comentários

Para considerações sobre desempenho bufferSize e maximumFileSize deve ser múltiplos de 1024 bytes.For performance considerations, bufferSize and maximumFileSize should be multiples of 1024 bytes. maximumFileSize Não é um valor absoluto; é um limite que pode ser excedido até o tamanho da última mensagem.maximumFileSize is not an absolute value; it is a threshold that can be exceeded up to the size of the last message.

Aplica-se a