JustLog icon indicating copy to clipboard operation
JustLog copied to clipboard

Multiple Logger instances

Open Yourney opened this issue 3 years ago • 1 comments

Hi, Is it possible to have multiple Logger instances, like: I want to see two log files.

  • One with all the logging
  • One with only the critical ones so they are easily visible without the need for a Logfile analysis tool

In my AppDelegate, I created:

let genericLogger = JustLog.Logger.shared
let criticalLogger = JustLog.Logger()

And then I configured them both And then I called setup() on both

Would that be possible? (I tried and got a crash)

Or would there be another solution to get 2 logfiles ... or 2 instances of the Logger?

Thanks! Wouter

Yourney avatar Jun 02 '22 13:06 Yourney

When I do not use the JustLog.Logger.shared, but just create two loggers, the app runs well (i.e. 'does not crash') but all logging is still done in only one log file (ignoring the the second instance I created). So ... still no success in creating two log files.

Yourney avatar Jun 14 '22 14:06 Yourney

Hi @Yourney, I'm sorry the team didn't address this. I'm gonna go ahead and close this as we are deprecating the component and archiving the repo.

albertodebortoli avatar Jan 05 '24 11:01 albertodebortoli