Loggy<T extends LoggyType>.detached constructor

Loggy<T extends LoggyType>.detached(
  1. String name
)

Creates a new detached Loggy.

Returns a new Loggy instance (unlike new Loggy, which returns a Loggy singleton), which doesn't have any parent or children, and is not a part of the global hierarchical loggers structure.

It can be useful when you just need a local short-living logger, which you'd like to be garbage-collected later.

Implementation

factory Loggy.detached(String name) =>
    Loggy<T>._internal(name, null, <String, Loggy>{});