Skip to content
Snippets Groups Projects
Commit 9a7da331 authored by Odin K. Henriksen's avatar Odin K. Henriksen
Browse files

Added link to inspiration for code

parent 9f490355
Branches
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import (
"os"
)
//Created with inspiration from https://dev.to/gholami1313/saving-log-messages-to-a-custom-log-file-in-golang-ce5
//Function to handle logging of errors to errorlog file with message
func Logerror(err error, msg string) {
// log to custom file
......@@ -26,6 +27,7 @@ func Logerror(err error, msg string) {
log.Println(msg, err)
}
//Created with inspiration from https://dev.to/gholami1313/saving-log-messages-to-a-custom-log-file-in-golang-ce5
//Function to handle information logging to infofile
func Loginfo(msg string) {
LOG_FILE := "./logs/infolog"
......@@ -45,6 +47,7 @@ func Loginfo(msg string) {
log.Println(msg)
}
//Created with inspiration from https://dev.to/gholami1313/saving-log-messages-to-a-custom-log-file-in-golang-ce5
//Function to handle error message display to file.
func Logerrorinfo(msg string) {
// log to custom file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment