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

Logging as a seperate subproject #394

Open
enthdegree opened this issue Jul 22, 2013 · 5 comments
Open

Logging as a seperate subproject #394

enthdegree opened this issue Jul 22, 2013 · 5 comments

Comments

@enthdegree
Copy link

Logging in the ExampleBot subproject is done through it's Log class.

SteamTrade can get their events printed in the trade manager console by throwing an OnError(string message) event that a UserHandler catches and runs OnTradeError([...]) on.

There is no direct way to log events outside of ExampleBot, because that is the namespace where Log.cs resides.

I have a working local branch where I put Log.cs into a separate subproject called SteamBotLog so that you can log from everywhere, as long as an instance of the Log class is in scope. The drawback of this is that you have to change all your constructors to let you pass in a Log.

Is this worth committing?

@cwhelchel
Copy link
Contributor

IDK. Perhaps something more general? like SteamBot.Core project... that way more common stuff can be put in there?

@enthdegree
Copy link
Author

Sounds good to me

@Jessecar96
Copy link
Owner

Would be nice to have.

cwhelchel added a commit to cwhelchel/SteamBot that referenced this issue Jan 22, 2014
Surround web call with a try...catch. The exception is silently ignored but needs to be logged.

ref Jessecar96#394
@fjch1997
Copy link
Contributor

IMHO there shouldn't even be a Log.cs because the built-in TraceSource already has all the functionalities our Log has.

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

Successfully merging a pull request may close this issue.

5 participants
@enthdegree @cwhelchel @Jessecar96 @fjch1997 and others