-
Notifications
You must be signed in to change notification settings - Fork 910
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
Refactored Log.cs to a separate project #877
Conversation
It won't run otherwise because other projects are configured for .NET 4.5.1
...to Logger project
Ironically, it was throwing a warning
...and replaced Console.WriteLine, where possible
I know that this change does not quite fit in this PR, but I thought that it is stupid to make a separate PR just for one line. Thanks @scholtzm!
@@ -122,7 +125,7 @@ public bool DoLogin(string username, string password) | |||
string steamGuardId = ""; | |||
do | |||
{ | |||
Console.WriteLine("SteamWeb: Logging In..."); | |||
Log.Info("SteamWeb: Logging In..."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause a NullReferenceException
, no? Log
has never been assigned.
This change is needed because Log() requires parameters from Configuration.cs
...where needed
...and assigned Log
Rather than creating another project to hold the log configuration and creating a new Log instance in every class, why not just use a single static Log instance? |
That would be better, but due to some real life changes I can no longer work on this PR, sorry. If someone wants to resume where I left off, feel free. |
I refactored Log.cs to a separate project called Logger.
I fixed all references and namespaces and I also replaced Console.WriteLine() in SteamTrade with Log functions accordingly.
Fixes #394.