Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate logs getting generated #327

Open
LoydAntony opened this issue Jun 9, 2023 · 1 comment
Open

Duplicate logs getting generated #327

LoydAntony opened this issue Jun 9, 2023 · 1 comment

Comments

@LoydAntony
Copy link

Duplicate logs getting created

Issue

When we added the log in the code, the logs are getting created twice. I have tried adding the log on Delegate its still printing the logs twice in the console.

  • Xcode: 14.2 (Rosetta)
  • XCGLogger version: 7.2.0
  • swift: 5
Screenshot 2023-06-09 at 8 11 59 PM

enabledDestinations.count is 3 for one log registered which is printing two message on the console.

Screenshot 2023-06-09 at 8 19 08 PM

You can see the console the message Theater loaded successfully 🎉 theater: is printed twice on the console.
The LOG is triggered only once in the code.
But in the XCLogger Class the function

open func logln(_ level: Level = .debug, functionName: String = #function, fileName: String = #file, lineNumber: Int = #line, userInfo: [String: Any] = [:], closure: () -> Any?)

is creating duplicate logs in the terminal, which is causing issue in debugging the source code.

It looks like there is bug in the login function which is causing the logs to get generated twice.

Required Result

Print the log only once in the terminal and do not create duplicate of it

@LoydAntony LoydAntony changed the title Duplicate logs getting created Duplicate logs getting generated Jun 9, 2023
@sanojkashyap007
Copy link

Even I am also facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants