-
Notifications
You must be signed in to change notification settings - Fork 670
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
Log redirection (v2.0) #845
base: Corillian-asyncio
Are you sure you want to change the base?
Conversation
Sorry, I'm idiot and couldn't find all places with |
Now it has been built successfully. |
Hi @KerberX , That's a good idea! Look at the function pointer, would it not be better to directly call the user function instead of our ? This way he will manage as he wants how to log it. Like DokanDbgPrint would create the debug output and then call PDokanDbgPrint -> return Or follow the current output path. |
Yeah, that would be better indeed. I'll make the changes. Could it be possible to implement such thing for v1.x? As far as I know there is no global Init/Shutdown routine that can initialize logging functions. |
It can be possible to implement it yes at mount time. |
In the same fashion as operation callbacks? I'd like that solution. |
Yes this way but maybe not directly to the dokanoperations 😄 |
The new V2 has a new mandatory API named DokanInit. |
I'll see what I can do. I still need to see has been changed between that version and the current one. |
Adds log redirection options.
Checklist
Changes proposed in this pull request:
Currently there is no way to make Dokany log its operation to user-defined target. There is an option to use
stderr
instead ofOutputDebugStringA/W
but that might not be desirable to the library user.I've added a struct with two function to be provided by the library user that will take formatted debug string and return a
BOOL
value which indicated in Dokany should proceed with its own debug output. The value isTRUE
by default so in case the used didn't provide any log redirection function the library will output log itself.