This repository was archived by the owner on Aug 18, 2020. It is now read-only.
Conversation
vmx
reviewed
Apr 21, 2020
vmx
left a comment
There was a problem hiding this comment.
Please note that the generated.FilInitLogFd() call needs to be the first thing you ever call on the FFI. If you call any FFI method before, then the logger might already be initialized and this call would be a no-op.
Thinking about that, I should probably return an error then.
| resp := generated.FilInitLogFd(int32(logFile.Fd())) | ||
| resp.Deref() | ||
|
|
||
| //TODO: figure out whether generated.FilDestoryInitLogFdResponse needs to be called |
There was a problem hiding this comment.
Yes, generated.FilDestoryInitLogFdResponse() should be called, it just destroys the response, not the logging or file handler or so.
|
|
||
| //TODO: figure out whether generated.FilDestoryInitLogFdResponse needs to be called | ||
| defer generated.FilDestroyInitLogFdResponse(resp) | ||
| //TODO: figure out how to close the file |
There was a problem hiding this comment.
Good point. I haven't thought about a way to stop the logging to file, I expected to run "forever", which probably isn't a good idea.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is not entirely working just yet. It appears to connect the rust logger to go-log, but there is an issue with closing the file I believe. Help would be appreciated