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 support for relative logfile paths #678
Add support for relative logfile paths #678
Conversation
} | ||
|
||
writeActions.Add(x => WriteLogEntry(arguments, x)); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Console.WriteLine("Failed to configure logging: " + ex.Message); | ||
Console.WriteLine("Failed to configure logging for '{0}': {1}", arguments.LogFilePath, ex.Message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger.WriteWarning
would be better than using Console.WriteLine
is it's possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I just didn't want to do anything about that in this (old) part of the code.
@asbjornu there're 2 failing log related tests, would you mind fixing them? |
…file's path is C:\GitVersion.log, i.e. to the root of a drive. Since that's a valid use case, `null` needs to be supported.
…broke a couple of tests
Add support for relative logfile paths
This changes the handling of
Arguments.LogFilePath
such that it can be relative as well as absolute. It also improves what is logged to the console when the log file can't be created.