-
Notifications
You must be signed in to change notification settings - Fork 671
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
Library / Mirror - Allow custom logger set during DokanInit #851
Comments
Or we might just let the user set a function pointer / struct function pointer redirecting to his own logger as talked here: |
I haven't had a chance to evaluate these thoughts as yet. I may not have
time until Tuesday November 26. Please wait until then to make a decision.
…-Kyle H
On Sun, Nov 24, 2019, 02:47 Liryna ***@***.***> wrote:
Or we might just let the user set a function pointer redirecting to his
own logger as talked here:
#845 <#845>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#851?email_source=notifications&email_token=AABMMFMSJ2VIBVTVUGWVBODQVI5SDA5CNFSM4JQWSCNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAGQMY#issuecomment-557869107>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABMMFNS4ULTOKOE2CTXJX3QVI5SDANCNFSM4JQWSCNA>
.
|
As nice as spdlog is, I think I prefer the idea of being able to provide a struct of logging callback procedures. There's going to be something different that needs to be done to support dokan-dotnet et al. (I will not be averse to the creation of a shallow wrapper for spdlog, but I am averse to trying to compile in spdlog and then enforce customization under its rules.) For example, if we tried to use spdlog with C#, either the interface DLL would need to be compiled with C++/CLI or a delegate class used to customize spdlog (much like DokanNet.DokanOperationProxy) would need to be written. While it would be possible, it would also be another thing that would need to be supported if spdlog's interface changes at all. Using p/invoke marshaling into a struct allows the user complete control over how it works, in their language of choice. (It may not be as performant, but the C# interface to dokany already takes some simplifying shortcuts that reduce performance.) I'll have to look at #845 to see if there's anything that strikes me as unworkable for dokan-dotnet usage. This will have to wait a few days, because we're about to have Thanksgiving here in US. |
Now that we have a |
I can say that the logger we been using dokan.net isn't exactly good and I was thinking serilog could have been a better choice, so I would say as long as it won't tie us to a specific implementation or dependency it's ok |
Change Library / Mirror logger to spdlog
Am currently doing a memory filesystem for dokan as samples in c++ and use spdlog as logging library.
I feel like it would be a good idea to replace the current log system we have in the library and in the mirror by this library.
It is header only, prettier and more flexible to manage the output type (it does support OutputDebugString)
Does someone have an argument this should not be made ?
ping @Kerbox @Rondom @kyanha
The text was updated successfully, but these errors were encountered: