SteamBot icon indicating copy to clipboard operation
SteamBot copied to clipboard

Logging as a seperate subproject

Open enthdegree opened this issue 12 years ago • 5 comments
trafficstars

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?

enthdegree avatar Jul 22 '13 00:07 enthdegree

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

cwhelchel avatar Jul 22 '13 02:07 cwhelchel

Sounds good to me

enthdegree avatar Jul 22 '13 02:07 enthdegree

Would be nice to have.

Jessecar96 avatar Jul 22 '13 03:07 Jessecar96

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

fjch1997 avatar Mar 31 '16 01:03 fjch1997