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

unable to locate config file easily with new nuget package references #3

Open
vdaron opened this issue Oct 11, 2017 · 2 comments
Open

Comments

@vdaron
Copy link

vdaron commented Oct 11, 2017

Hi
I have some issues with the way to build the configuration file path in the current implementation :
the GetConfigFileFullPath method use the location of the apache.log4net.Extensions.Logging.dll file as default Directory. But the file is located in the central nuget repository by default.

C:\Users\USERNAME\.nuget\packages\apache.log4net.extensions.logging\1.0.0.8\lib\netstandard1.5\log4net.config

Why don't use the Directory.GetCurrentDirectory method instead ?

Thanks for help

@joshclark
Copy link
Owner

The assumption is that you are providing your own log4net.config file. The library has no way of knowing how you want log4net configured for your application. You would add the log4net.config file to your project and set it to copy to the output directory. This would cause the config file to be located in the same directory and the apache.log4net.Extensions.Logging.dll (which is why we look for it there)

@tonyhicks20
Copy link

Hi JoshClark,

I have had the same issue as vdaron.
Providing my own log4net config doesn't work since it looks for the log4net config in the nuget cache folder, not where my config file is located - The output directory.

I agree with his suggestion of using the current directory as the default, but maybe if you're hesitant, would you be willing to allow a parameter to override the directory to look for the log4net.config?

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

No branches or pull requests

3 participants