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

Prevent logging LogDetail into file when open file #271

Open
kukushi opened this issue Oct 21, 2018 · 2 comments
Open

Prevent logging LogDetail into file when open file #271

kukushi opened this issue Oct 21, 2018 · 2 comments

Comments

@kukushi
Copy link

kukushi commented Oct 21, 2018

First, thanks for your great work.

I'm using an AutoRotatingFileDestination with warning output level. The problem is, each time when the app opening the file, XCGLogger will log something like [Info] > XCGLogger appending log to... into the file. That's wired because my destination has a warning output level.

I'm wondering it's a bug or expected behavior?

@phimage
Copy link

phimage commented Nov 30, 2018

let logDetails = LogDetails(level: .info, date: Date(), message: "XCGLogger " + (fileExists && shouldAppend ? "appending" : "writing") + " log to: " + writeToFileURL.absoluteString, functionName: "", fileName: "", lineNumber: 0, userInfo: XCGLogger.Constants.internalUserInfo)

This code use internal routine, so bypass the level control

@nick3389
Copy link

Hello, I have the same question. Is there any way to customise the setup log level? Personally, I don't want the path of the logfile to be visible as I use it in a static library.

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

3 participants