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

Add default logmanager #112

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

Jark
Copy link
Collaborator

@Jark Jark commented Feb 2, 2017

As discussed in #111, this will add a default log manager which will log to the debug console to make it so that we can detect errors in setup and operation easier.

@tomkuijsten
Copy link
Owner

Looks good, but one small question. Will it ever work? You are using Debug.WriteLine which will be removed during optimization in Release mode. Our nuget package contains only Release mode assemblies. It will work for us, during development of Restup itself, it won't work for consumers of the package.

return;
}

if (_log.IsDebugEnabled())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this check be moved to the Debug method itself. Pretty error prone if you have to check this yourself everytime.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debug method itself should have it as well, the only thing the _log.IsDebugEnabled() checks will make sure that the string won't be computed. Since these are in the critical path for request handling I didn't want the strings to be computed.

@tomkuijsten
Copy link
Owner

Is this something we should still look at?

@Jark
Copy link
Collaborator Author

Jark commented May 16, 2017

I'll take a look at this at some point, but probably not to soon. Might have some time this weekend.

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.

2 participants