Conversation
|
This is great, Dahlia! We need to fix the logger a bit before we can move this forward. Unfortunately the way I wrote the logger makes it wipe the file a bit TOO quickly (when nancy starts up), I can work on that with you and @TheDoroTheExploro pretty soon! |
| } | ||
|
|
||
| func printLog() { | ||
| file, _ := os.Open(logger.GetLogFileLocation()) |
There was a problem hiding this comment.
We should check the error here, so an improvement to make would be:
file, err := os.Open(logger.GetLogFileLocation())
if err != nil {
fmt.Println(err)
}
There was a problem hiding this comment.
I concur on both of these probably wouldn't hurt to also have some sort of user friendly message along with the raw error that happened.
The log you were looking for wasn't on the pile with the others ¯\_(ツ)_/¯ :)
|
|
||
| func printLog() { | ||
| file, _ := os.Open(logger.GetLogFileLocation()) | ||
| b, _ := ioutil.ReadAll(file) |
There was a problem hiding this comment.
We should check the error here, so an improvement to make would be:
b, err := ioutil.ReadAll(file)
if err != nil {
fmt.Println(err)
}
|
Kudos, SonarCloud Quality Gate passed!
|








Add log command that will output the Nancy Log to the console
This pull request makes the following changes:
cc @bhamail / @DarthHater