Class Logger
- Namespace
- OptunaSharp.Logging
- Assembly
- OptunaSharp.dll
A named logger routed through the shared OptunaSharp root logger, mirroring the subset of
Python's logging.Logger that Optuna uses.
public sealed class Logger
- Inheritance
-
Logger
- Inherited Members
Properties
Name
Gets this logger's component name.
public string Name { get; }
Property Value
Methods
Debug(string)
Emits a debug record when permitted by the current verbosity.
public void Debug(string message)
Parameters
messagestringText to include in the log record.
Exceptions
- Exception
A registered log handler fails while processing the record.
Error(string)
Emits a error record when permitted by the current verbosity.
public void Error(string message)
Parameters
messagestringText to include in the log record.
Exceptions
- Exception
A registered log handler fails while processing the record.
Info(string)
Emits a info record when permitted by the current verbosity.
public void Info(string message)
Parameters
messagestringText to include in the log record.
Exceptions
- Exception
A registered log handler fails while processing the record.
IsEnabledFor(int)
Checks whether the shared verbosity threshold permits this severity.
public bool IsEnabledFor(int level)
Parameters
levelintNumeric logging severity, using the LogLevel constants.
Returns
- bool
True when the severity meets the threshold and logging is not disabled.
Warning(string)
Emits a warning record when permitted by the current verbosity.
public void Warning(string message)
Parameters
messagestringText to include in the log record.
Exceptions
- Exception
A registered log handler fails while processing the record.
Warning(string, Exception?)
Emits a warning record when permitted by the current verbosity.
public void Warning(string message, Exception? exception)
Parameters
messagestringText to include in the log record.
exceptionExceptionOptional exception retained for handler formatting.
Exceptions
- Exception
A registered log handler fails while processing the record.