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

Consider enabling FileLifecycleHooks for shared log files #97

Open
nblumhardt opened this issue Apr 22, 2019 · 1 comment
Open

Consider enabling FileLifecycleHooks for shared log files #97

nblumhardt opened this issue Apr 22, 2019 · 1 comment

Comments

@nblumhardt
Copy link
Member

Currently, we throw if hooks are specified and shared is true.

This is mostly because it's tricky to use stream wrapping (one of the main use cases) with the atomic-append-based shared file sink, but also because it's unclear how many hooks could be implemented correctly in the synchronization-free world of the atomic-append sink.

When both hooks and shared are set, we could fall back to using the (portable) OS-mutex-based shared file sink. This would be simpler to integrate the hooks into, and we could call the hooks under the mutex to improve chances of writing correct implementations.

@LiorBanai
Copy link

Hi @nblumhardt is this something can can be supported? currently I need to know the name of the log file inside my ILogEventSink implementation so I use hook the get the file name on OnFileOpened method but also need shared file to be able to copy the file to other location periodically.

currently I'm getting 'File lifecycle hooks are not currently supported for shared log files. Parameter name: hooks' exception

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

No branches or pull requests

2 participants