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

Consider implementing a hook to inject a configured Raygun client instance #6

Closed
girtsl opened this issue Mar 23, 2015 · 1 comment
Closed
Assignees

Comments

@girtsl
Copy link

girtsl commented Mar 23, 2015

Please take a look at this question on StackOverflow.
I'm not sure how well this aligns with log4net design principles, but using the same approach I was able to put together a log4net.raygun implementation that would obtain an instance of Raygun client configured by the host application.
The pros for such feature include but are not limited to: taking advantage of Raygun's means of configuration, smaller memory footprint.

If you consider this feature worth adding to the project, please also consider changing the raygun message building logic - the log4net.Raygun.RaygunMessageBuilder implementation is currently dettached from the RaygunClient (or log4net.Raygun.Core.IRaygunClient) instance and does not use the property values set on it - ApplicationVersion to name one.

@plmwong
Copy link
Owner

plmwong commented Dec 18, 2015

Added in a configuration property on the appender which can be pointed to an implementation of IRaygunClientFactory. This gives developers control over the construction of RaygunClients used by the appender, including just having a factory which points to an instance (e.g. RaygunClientFactoryMethod.From(() => _preconfiguredInstance).

This has been merged into release 4.2.0.

@plmwong plmwong closed this as completed Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants