LogConfig class

Configuration for the logging system.

Constructors

LogConfig.new({bool enabled = false, LogLevel globalLevel = LogLevel.info, bool enableClientLogs = true, bool enableAgentLogs = true, bool enableToolLogs = true, bool enableConsoleOutput = true, bool enableFileOutput = false, String? logFilePath})
Creates a new log configuration.
const
LogConfig.both({required String filePath, LogLevel level = LogLevel.info, bool enableClientLogs = true, bool enableAgentLogs = true, bool enableToolLogs = true})
Creates a log configuration with both console and file output enabled.
factory
LogConfig.consoleOnly({LogLevel level = LogLevel.info, bool enableClientLogs = true, bool enableAgentLogs = true, bool enableToolLogs = true})
Creates a log configuration with only console output enabled.
factory
LogConfig.disabled()
Creates a disabled log configuration.
factory
LogConfig.fileOnly({required String filePath, LogLevel level = LogLevel.info, bool enableClientLogs = true, bool enableAgentLogs = true, bool enableToolLogs = true})
Creates a log configuration with only file output enabled.
factory

Properties

enableAgentLogs bool
Whether to log AI agent operations.
final
enableClientLogs bool
Whether to log AI client operations.
final
enableConsoleOutput bool
Whether to output logs to the console.
final
enabled bool
Whether logging is enabled globally.
final
enableFileOutput bool
Whether to output logs to a file.
final
enableToolLogs bool
Whether to log tool operations.
final
globalLevel LogLevel
The minimum log level to display.
final
hashCode int
The hash code for this object.
no setterinherited
logFilePath String?
The path to the log file (required if enableFileOutput is true).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({bool? enabled, LogLevel? globalLevel, bool? enableClientLogs, bool? enableAgentLogs, bool? enableToolLogs, bool? enableConsoleOutput, bool? enableFileOutput, String? logFilePath}) LogConfig
Creates a copy of this configuration with the specified changes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited