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
Custom Log output #52
Comments
Great idea! Currently there is no way to do it but it could be added without much difficulty. The Would something like this work? public interface ITorSharpLogger
{
void OnOutput(string data);
void OnError(string data);
} And you pass in an implementation of this None of this is implemented yet but I want to see what specifically you are thinking could work. |
Doing it with an Inteface isnt such a bad idea but i think doing it over events would be better, like: interface ITorSharpProxy
{
....
public event EventHandler<LogEventArgs> OnOutput;
public event EventHandler<ErrEventArgs> OnError;
....
}
ITorSharpProxy proxy = new TorSharpProxy();
proxy.OnOutput += OnOutput;
proxy.OnError += OnError; or a mix between the two. |
Sounds good! No clue when I will get to this. It sounds like a solid idea though and it seems quite doable as a community contribution. |
This is a great project, but I'm also missing this feature, so I decided to implement in on my own! I committed some changes as you can see on my fork. But I'm having troubles, so I decided to ask a question on StackOverflow, any help is appreciated! Thanks! |
Just saw this since I was looking for a way to control the output channel as well... why not implement the use of the standard .NET core ILogger interface? |
Great point @developer82, this is a very reasonable API to align upon. Want to make a PR to add this capability? |
@joelverhagen downloaded the code. Will try... |
I've added support for this. I went with a simple C# event for stdout and another for stderr on |
Is there already a way to redirect the console output for custom logging?
The text was updated successfully, but these errors were encountered: