LDLogger class final
Logging implementation used by the SDK. A default constructed logger will enable the LDLogLevel.info level and will output messages using the LDBasicLogPrinter.
Constructors
- LDLogger.new({dynamic adapter = const LDBasicLogPrinter(), LDLogLevel? level, String? logTag})
- Construct a logger.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- level → LDLogLevel
-
final
- logTag → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
debug(
String message) → void - Log a debug message. The message will not be sent to the LDLogAdapter if the logging level is not enabled.
-
error(
String message) → void - Log an error message. The message will not be sent to the LDLogAdapter if the logging level is not enabled.
-
info(
String message) → void - Log an informative message. The message will not be sent to the LDLogAdapter if the logging level is not enabled.
-
isLevelEnabled(
LDLogLevel toCheck) → bool - Check if the specified log level is enabled.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subLogger(
String subTag) → LDLogger -
Create a sub-logger with an additional tag. The tag will be appended
to the base tag. For instance
logger.subLogger("Streaming")
, when called on a default logger instance, would result in a tag ofLaunchDarkly.Streaming
. This is primarily intended to structure the log messages emitted by the SDK. -
toString(
) → String -
A string representation of this object.
inherited
-
warn(
String message) → void - Log a warning message. The message will not be sent to the LDLogAdapter if the logging level is not enabled.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited