次の方法で共有


IOrderPipeline::SetLogFile Method

Use this method to identify the file in which to log the operations of the pipeline component.

HRESULT IOrderPipeline::SetLogFile(
  BSTR pszFileName
);
Sub SetLogFile(
    pszFileName As String
)

Parameters

  • pszFileName
    [C++]

    [in] A BSTR containing the name of the file in which to log events.

    [Visual Basic]

    A String containing the name of the file in which to log events.

Return Value

[C++]

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic]

None.

Error Values

[C++]

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic]

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

This method is for use by developers who want to analyze pipeline configuration file information. Logging should never be used in a production environment: it degrades performance and may compromise the security of credit card numbers in non-set transactions.

When logging is set, the pipeline logs the pipeline components that are called and the error values each component returns. The pipeline also logs all Dictionary and SimpleList object read and write operations.

Calling this method with an empty string turns off logging.

Example

' pOrdPipeline is a.OrderPipeline object.

errVal = pOrdPipeline.SetLogFile("CustomShipping.log")

See Also

Other Resources

OrderPipeline Object

IOrderPipeline::LoadPipe Method

IOrderPipeline::OrderExecute Method