Logger class

Koin has a simple logging API to log any Koin activity (allocation, lookup ...) Koin proposes some implementation of logging, in function of the target platform:

  • PrintLogger - directly log into console (included in koin-core)
  • EmptyLogger - log nothing (included in koin-core)

Set logging at start

By default Koin use the EmptyLogger. You can use directly the PrintLogger as following:

startKoin((app){
   app.printLogger(level: Level.info);
 });

Constructors

Logger([Level level = Level.info])
const
Logger.empty(Level level)
factory
Logger.print(Level level)
factory

Properties

hashCode int
The hash code for this object.
read-onlyinherited
level Level
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

debug(String msg, {Level level}) → void
error(String msg) → void
info(String msg) → void
isAt(Level level) bool
isAtdebug(String msg, Level isAtLevel) → void
isAtInfo(String msg, Level isAtLevel) → void
isAtLog(Level level, String msg, Level isAtLevel) → void
log(Level level, String msg) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

logger Logger
read / write