Skip to content

Add default logmanager#112

Open
Jark wants to merge 4 commits intotomkuijsten:developmentfrom
Jark:feature-add-default-logmanager
Open

Add default logmanager#112
Jark wants to merge 4 commits intotomkuijsten:developmentfrom
Jark:feature-add-default-logmanager

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