Skip to content
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

Closed
wants to merge 15 commits into from
Closed

Refactored Log.cs to a separate project #877

wants to merge 15 commits into from

Conversation

aleksamagicka
Copy link
Contributor

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.

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...");
Copy link
Collaborator

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.

@BlueRaja
Copy link
Collaborator

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?

@aleksamagicka
Copy link
Contributor Author

aleksamagicka commented Dec 13, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging as a seperate subproject
3 participants