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 base directory path as option to rolling text writer #28

Open
sgryphon opened this issue Apr 20, 2018 · 1 comment
Open

Add base directory path as option to rolling text writer #28

sgryphon opened this issue Apr 20, 2018 · 1 comment

Comments

@sgryphon
Copy link
Owner

Could you please add in RollingTextWriter => private string GetCurrentFilePath(TraceEventCache eventCache)

Add an option to set the base directory, as the current options don’t work on a service unless you hard code the path, that does not work well when the installer has the ability to change the installation path.

             case "BASEDIR":
                        value = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location);
                        break;
@lchengNetBall
Copy link

In the App.config file, I have specified the log file to be written to the "Logs" folder under where the executable is running from.
This is what is in the App.config file.
"initializeData=".\Logs{ApplicationName}_{DateTime:yyyy-MM-dd}.log"

It looks like the log file is outputted to "C:\Windows\system32\Logs" folder. Is this a known issue?

C:\Windows\system32\Logs\

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