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

FileLogRecorder asynchronous or synchronous Mode issue #96

Open
evanxlh opened this issue Jun 27, 2018 · 0 comments
Open

FileLogRecorder asynchronous or synchronous Mode issue #96

evanxlh opened this issue Jun 27, 2018 · 0 comments

Comments

@evanxlh
Copy link

evanxlh commented Jun 27, 2018

I'm very glad to find such wonderful log open source. But I have some questions about the FileLogRecorder. As the document said, it support asynchronous and synchronous Mode,
but I read the code, it seems as if the parameters entry, currentQueue and synchronousMode are not used.

open override func record(message: String, for entry: LogEntry, currentQueue: DispatchQueue, synchronousMode: Bool)
    {
        var addNewline = true
        let chars = message.characters
        if chars.count > 0 {
            let lastChar = chars[chars.index(before: chars.endIndex)]
            addNewline = !newlines.contains(lastChar)
        }

        fputs(message, file)

        if addNewline {
            fputc(0x0A, file)
        }

        fflush(file)
    }
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

1 participant