Table of Contents

Class XpingConsoleLogger

Namespace
Xping.Sdk.Core.Diagnostics
Assembly
Xping.Sdk.Core.dll

Console-based logger implementation that writes to stdout and stderr. Thread-safe and works in all test frameworks and CI/CD environments.

public sealed class XpingConsoleLogger : IXpingLogger
Inheritance
XpingConsoleLogger
Implements
Inherited Members

Constructors

XpingConsoleLogger(XpingLogLevel)

Initializes a new instance of the XpingConsoleLogger class.

public XpingConsoleLogger(XpingLogLevel minLevel = XpingLogLevel.Info)

Parameters

minLevel XpingLogLevel

The minimum log level to output. Defaults to Info.

Methods

IsEnabled(XpingLogLevel)

Determines whether logging is enabled for the specified level.

public bool IsEnabled(XpingLogLevel level)

Parameters

level XpingLogLevel

The log level to check.

Returns

bool

True if logging is enabled for the specified level; otherwise, false.

LogDebug(string)

Logs a debug message. These provide detailed diagnostic information for troubleshooting.

public void LogDebug(string message)

Parameters

message string

The debug message to log.

LogError(string)

Logs an error message. These indicate failures that prevent the SDK from functioning correctly.

public void LogError(string message)

Parameters

message string

The error message to log.

LogInfo(string)

Logs an informational message. These provide general status updates about SDK operations.

public void LogInfo(string message)

Parameters

message string

The informational message to log.

LogWarning(string)

Logs a warning message. These indicate potential issues that don't prevent operation but may need attention.

public void LogWarning(string message)

Parameters

message string

The warning message to log.