Open enthdegree opened 11 years ago
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.
Logging in the
ExampleBot
subproject is done through it'sLog
class.SteamTrade
can get their events printed in the trade manager console by throwing anOnError(string message)
event that aUserHandler
catches and runsOnTradeError([...])
on.There is no direct way to log events outside of
ExampleBot
, because that is the namespace whereLog.cs
resides.I have a working local branch where I put
Log.cs
into a separate subproject calledSteamBotLog
so that you can log from everywhere, as long as an instance of theLog
class is in scope. The drawback of this is that you have to change all your constructors to let you pass in aLog
.Is this worth committing?