swiftybeaver-provider icon indicating copy to clipboard operation
swiftybeaver-provider copied to clipboard

Log handler is being recursively added.

Open pankajsoni19 opened this issue 5 years ago • 1 comments

Using as per steps in Readme of this repo.

This is being called multiple times: SwiftyBeaverLogger

public init(destinations: [BaseDestination]) {
        for destination in destinations {
            swiftybeaver.addDestination(destination)
        }
    }

pankajsoni19 avatar Sep 07 '19 10:09 pankajsoni19

This seems like the correct behavior. You initialize the logger with an array of destinations, which it adds all of to SwiftyBeaver. You mentioned the README example, which also shows proper usage of this, a single initialization with 2 destinations:

SwiftyBeaverLogger(destinations: [console, fileDestination])

JRHeaton avatar Oct 10 '19 18:10 JRHeaton