SteamBot
SteamBot copied to clipboard
Logging as a seperate subproject
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?
IDK. Perhaps something more general? like SteamBot.Core project... that way more common stuff can be put in there?
Sounds good to me
Would be nice to have.
IMHO there shouldn't even be a Log.cs because the built-in TraceSource already has all the functionalities our Log has.