Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.33k stars 910 forks source link

Logging as a seperate subproject #394

Open enthdegree opened 11 years ago

enthdegree commented 11 years ago

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 commented 11 years ago

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

enthdegree commented 11 years ago

Sounds good to me

Jessecar96 commented 11 years ago

Would be nice to have.

fjch1997 commented 8 years ago

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