WIP : Elektron Logging library #16
53
elektronLogging/ElektronFormatter.go
Normal file
|
@ -0,0 +1,53 @@
|
|||
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
package elektronLogging
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
import (
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
"bytes"
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
"fmt"
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
"strings"
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
"github.com/fatih/color"
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
log "github.com/sirupsen/logrus"
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
type ElektronFormatter struct {
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
TimestampFormat string
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
}
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
func (f ElektronFormatter) getColor(entry *log.Entry) *color.Color {
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
switch entry.Level {
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
case log.InfoLevel:
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
return color.New(color.FgGreen, color.Bold)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
case log.WarnLevel:
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
return color.New(color.FgYellow, color.Bold)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
case log.ErrorLevel:
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
return color.New(color.FgRed, color.Bold)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
case log.FatalLevel:
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
return color.New(color.FgRed, color.Bold)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
default:
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
return color.New(color.FgWhite, color.Bold)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
}
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
}
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
func (f ElektronFormatter) Format(entry *log.Entry) ([]byte, error) {
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
var b *bytes.Buffer
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
if entry.Buffer != nil {
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
b = entry.Buffer
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
} else {
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
b = &bytes.Buffer{}
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
}
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
levelColor := f.getColor(entry)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
level := levelColor.Sprintf("[%s]:",strings.ToUpper(entry.Level.String()))
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
message := fmt.Sprintf("%s %s %s ",level,entry.Time.Format(f.TimestampFormat), entry.Message)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
var formattedFields []string
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
for key, value := range entry.Data {
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
formattedFields = append(formattedFields,
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
strings.Join([]string{key, fmt.Sprintf("%s", value)}, "="))
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
}
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
b.WriteString(message)
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
b.WriteString(strings.Join(formattedFields, ", "))
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
b.WriteByte('\n')
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
return b.Bytes(), nil
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
||||
}
|
||||
![]() Formatting Formatting
![]() Formatting Formatting
![]() Use strings.join instead. You should create the slice and append the message if necessary. Use [strings.join](https://golang.org/pkg/strings/#Join) instead. You should create the slice and append the message if necessary.
![]() This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf. This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.
![]() Okay. Sure Okay. Sure
![]() value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : value is not a string here, it is of type interface{}. But to avoid using sprintf, would it be fine to use type assertion? For eg : `value.(string) `
![]() Done Done
![]() Done Done
![]() Line 43 and 44 can fit in one line. We currently do not have any style linting setup. Line 43 and 44 can fit in one line. We currently do not have any style linting setup.
![]() Peeked at how logrus serializes values and seems like fmt.Sprint is used if type assertion fails. Peeked at how [logrus](https://github.com/sirupsen/logrus/blob/67a7fdcf741f4d5cee82cb9800994ccfd4393ad0/text_formatter.go#L315) serializes values and seems like fmt.Sprint is used if type assertion fails.
![]() ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it. ahh alright, I thought it was a string coming in. Alright, if it's been sanity checked then i'm good with it.
![]() Okay Okay
|
53
elektronLogging/clsfnTaskDistOverheadLogger.go
Normal file
|
@ -0,0 +1,53 @@
|
|||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
package elektronLogging
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
import (
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
//"fmt"
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
"os"
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
logrus "github.com/sirupsen/logrus"
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
data "gitlab.com/spdf/elektron/elektronLogging/data"
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
type ClsfnTaskDistOverheadLogger struct {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
LoggerImpl
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
func NewClsfnTaskDistOverheadLogger(logType int, prefix string) *ClsfnTaskDistOverheadLogger {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
cLog := new(ClsfnTaskDistOverheadLogger)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
cLog.Type = logType
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
cLog.SetLogFile(prefix)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
return cLog
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
func (cLog *ClsfnTaskDistOverheadLogger) Log(logType int, level logrus.Level, logData data.LogData,message string) {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
if cLog.Type == logType {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
logFields := cloneFields(logData)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
log.SetLevel(level)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
if cLog.AllowOnConsole {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
log.SetOutput(os.Stdout)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
log.WithFields(logFields).Println(message)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
log.SetOutput(cLog.LogFileName)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
log.WithFields(logFields).Println(message)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
if cLog.next != nil {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
cLog.next.Log(logType, level, logData, message)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
tskDistLogPrefix := prefix + config.TaskDistConfig.FilenameExtension
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
if logDir != "" {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
tskDistLogPrefix = logDir + "/" + tskDistLogPrefix
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
if logFile, err := os.Create(tskDistLogPrefix); err != nil {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
logrus.Fatal("Unable to create logFile: ", err)
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
} else {
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
cLog.LogFileName = logFile
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
||||
}
|
||||
![]() Use struct literals instead of new as it's more descriptive: Use struct literals instead of new as it's more descriptive:
`&ClsfnTaskDistOverheadLogger{}`
![]() Where is log dir coming from? Shouldn't be a global Where is log dir coming from? Shouldn't be a global
![]() Okay, will do the changes Okay, will do the changes
![]() It is defined in It is defined in `createLogDir.go`. Since all these files belong to same package, I accessed it in this way.
![]() I think it will be better if it is encapsulated.
I think it will be better if it is encapsulated.
Something like
```go
type logDir struct {
name string
// other fields if necessary.
}
```
![]() Maybe refactor to Maybe refactor to `ClsfnTaskDistrOverheadLogger` so that it is clear that we are intending "Distribution" and now "Distance"?
![]() You should use filepath.Join(...) to keep it generic. You should use [filepath.Join(...)](https://golang.org/src/path/filepath/path.go?s=5893:5925#L199) to keep it generic.
![]() You can possible rewrite this function to something like the one shown below.
You can possible rewrite this function to something like the one shown below.
```go
func (cLog *ClsfnTaskDistOverheadLogger) SetLogFile(prefix string) {
filename := prefix + config.TaskDistConfig.FilenameExtension
if logDir != "" {
if logFile, err := os.Create(filepath.Join(logDir, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.LogFileName = logFile
cLog.AllowOnConsole = config.TaskDistConfig.AllowOnConsole
}
}
}
```
![]() Done Done
![]() Done Done
![]() Okay. Sure Okay. Sure
![]() Done Done
![]() looks good now thanks! looks good now thanks!
|
48
elektronLogging/consoleLogger.go
Normal file
|
@ -0,0 +1,48 @@
|
|||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
package elektronLogging
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
import (
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
"os"
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
log "github.com/sirupsen/logrus"
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
//data "github.com/spdfg/elektron/elektronLogging/data"
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
type ConsoleLogger struct {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
LoggerImpl
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
}
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
func NewConsoleLogger(logType int, prefix string) *ConsoleLogger {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
cLog := new(ConsoleLogger)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
cLog.Type = logType
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
cLog.SetLogFile(prefix)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
return cLog
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
}
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
func (cLog *ConsoleLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
if logType <= cLog.Type {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
//logFields := cloneFields(logData)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
log.SetLevel(level)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
log.SetOutput(os.Stdout)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
log.WithFields(logData).Println(message)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
log.SetOutput(cLog.LogFileName)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
log.WithFields(logData).Println(message)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
}
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
if cLog.next != nil {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
cLog.next.Log(logType, level, logData, message)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
}
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
}
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
func (cLog *ConsoleLogger) SetLogFile(prefix string) {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
consoleLogPrefix := prefix + config.ConsoleConfig.FilenameExtension
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
if logDir != "" {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
consoleLogPrefix = logDir + "/" + consoleLogPrefix
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
}
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
if logFile, err := os.Create(consoleLogPrefix); err != nil {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
log.Fatal("Unable to create logFile: ", err)
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
} else {
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
cLog.LogFileName = logFile
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
cLog.AllowOnConsole = true
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
}
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
||||
}
|
||||
![]() I see why you are directly assigning I see why you are directly assigning `true`. However, to allow disabling console logs to stdout retrofit this to `cLog.AllowOnConsole = config.ConsoleConfig.AllowOnConsole`.
![]() Why the pointer receiver? Technically, this function should not lead to change of state. Why the pointer receiver? Technically, this function should not lead to change of state.
![]() Sure Sure
![]() Yeah, thats right. I will change it Yeah, thats right. I will change it
|
38
elektronLogging/createLogDir.go
Normal file
|
@ -0,0 +1,38 @@
|
|||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
package elektronLogging
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
import (
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
"os"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
"strconv"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
"time"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logrus "github.com/sirupsen/logrus"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
)
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
var logDir string
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
func GetLogDir(startTime time.Time, prefix string) {
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
if logDir == "" {
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDir = createLogDir(prefix, startTime)
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
func createLogDir(prefix string, startTime time.Time) string {
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
// Creating directory to store all logs for this run
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName := "./" + prefix + strconv.Itoa(startTime.Year())
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += "-"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += startTime.Month().String()
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += "-"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += strconv.Itoa(startTime.Day())
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += "_"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += strconv.Itoa(startTime.Hour())
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += "-"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += strconv.Itoa(startTime.Minute())
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += "-"
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName += strconv.Itoa(startTime.Second())
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
if _, err := os.Stat(logDirName); os.IsNotExist(err) {
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
os.Mkdir(logDirName, 0755)
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
} else {
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logrus.Println("Unable to create log directory: ", err)
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
logDirName = ""
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
return logDirName
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() Why not use Why not use `string.join([]string{...}, "")` ?
![]() Yeah, thats right Yeah, thats right
![]() Extend the comment to show how the format of the log directory name is going to look. Extend the comment to show how the format of the log directory name is going to look.
![]() Keep the alias for logrus import consistent. So, refactor this to "log". Keep the alias for logrus import consistent. So, refactor this to "log".
![]() Done Done
![]() Done Done
|
48
elektronLogging/logger.go
Normal file
|
@ -0,0 +1,48 @@
|
|||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
package elektronLogging
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
import (
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
"time"
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
"fmt"
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
"strconv"
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
. "github.com/spdfg/elektron/elektronLogging/types"
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
log "github.com/sirupsen/logrus"
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
var config LoggerConfig
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
var logger *log.Logger
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
var formatter ElektronFormatter
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
//var logDir string
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
func BuildLogger() *LoggerImpl {
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
config.GetConfig()
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
startTime := time.Now()
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
formatter.TimestampFormat = "2006-01-02 15:04:05"
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
GetLogDir(startTime, "_")
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
prefix := fmt.Sprintf("_%s%s%s%s%s",startTime.Month().String(),strconv.Itoa(startTime.Day()),
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
strconv.Itoa(startTime.Hour()),strconv.Itoa(startTime.Minute()),strconv.Itoa(startTime.Second()))
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
logger = log.New()
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
logger.SetFormatter(&formatter)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
head := new(LoggerImpl)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
cLog := NewConsoleLogger(CONSOLE,prefix)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
pLog := NewPcpLogger(PCP,prefix)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
schedTraceLog := NewSchedTraceLogger(SCHED_TRACE, prefix)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
spsLog := NewSchedPolicySwitchLogger(SPS, prefix)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
schedWindowLog := NewSchedWindowLogger(SCHED_WINDOW, prefix)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
tskDistLog := NewClsfnTaskDistOverheadLogger(CLSFN_TASKDIST_OVERHEAD, prefix)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
head.SetNext(cLog)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
cLog.SetNext(pLog)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
pLog.SetNext(schedTraceLog)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
schedTraceLog.SetNext(spsLog)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
spsLog.SetNext(schedWindowLog)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
schedWindowLog.SetNext(tskDistLog)
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
return head
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
}
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
||||
var ElektronLog = BuildLogger()
|
||||
![]() Logger and Log are synonyms and therefore should not be used interchangeably. Logger and Log are synonyms and therefore should not be used interchangeably.
![]() Comments should start with capital letters and should end with a full stop. Comments should start with capital letters and should end with a full stop.
![]() The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the The second argument to GetLogDir() is a prefix. How is "_" a prefix? This is probably why the log directory name is not ending up prefixed with the one specified with the `-logPrefix` flag.
![]() What is the rationale behind having a dummy node as the head of the chain? What is the rationale behind having a dummy node as the head of the chain?
![]() Done Done
![]() Nothing specific. I had kept Nothing specific. I had kept `ElektronLog` as `LoggerImpl` type. But I have changed to `ConsoleLogger` rather. Works fine now
![]() Done Done
![]() Changed Changed `ElektronLog` to `ElektronLogger`
|
37
elektronLogging/loggerChain.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
package elektronLogging
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
import (
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
"os"
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
//data "github.com/spdfg/elektron/elektronLogging/data"
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
log "github.com/sirupsen/logrus"
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
)
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
type Logger interface {
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
SetNext(logType Logger)
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
Log(logType int, level log.Level, logData log.Fields, message string)
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
SetLogFile(prefix string)
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
type LoggerImpl struct {
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
Type int
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
AllowOnConsole bool
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
LogFileName *os.File
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
next Logger
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
func (l *LoggerImpl) SetNext(logType Logger) {
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
l.next = logType
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
func (l *LoggerImpl) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
if l.next != nil {
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
l.next.Log(logType, level, logData, message)
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
/*func cloneFields(logData data.LogData) log.Fields {
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
var newMap = make(log.Fields)
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
for k,v := range logData {
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
newMap[k] = v
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
return newMap
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
||||
}*/
|
||||
![]() If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here. If the code isn't needed it shouldn't be left here. If the commented out code is still needed there should be some justification for it still being here.
![]() Okay. Will remove the unnecessary code Okay. Will remove the unnecessary code
![]() As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all. As fields are optional, it is better to either have them as the last argument or not have them in the argument list at all.
I would in fact also maintain an internal data structure to store Fields that is cleared only after the log operation passes through the entire chain. You can then add a `WithFields(...)` method that wraps around `logrus.WithFields(...)`.
I have created [this sample code](https://play.golang.org/p/RILTxcZtT2w) for reference. The sample code also shows how formatted strings are corresponding args can be passed and we can wrap around `logrus.Logf(...)` for that.
![]() Refactor to Refactor to `LogFile` as it is a pointer to os.File and not string.
![]() Done Done
![]() Done Done
|
68
elektronLogging/loggerConfig.go
Normal file
|
@ -0,0 +1,68 @@
|
|||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
package elektronLogging
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
import (
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
"gopkg.in/yaml.v2"
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
"io/ioutil"
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
log "github.com/sirupsen/logrus"
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
elekEnv "gitlab.com/spdf/elektron/environment"
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
)
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
type LoggerConfig struct {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
SchedTraceConfig struct {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
Enabled bool `yaml:"enabled"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
FilenameExtension string `yaml:"filenameExtension"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
EnableColumnHeaders bool `yaml:"enableColumnHeaders"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
AllowOnConsole bool `yaml:"allowOnConsole"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
} `yaml:"schedTrace"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
PCPConfig struct {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
Enabled bool `yaml:"enabled"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
FilenameExtension string `yaml:"filenameExtension"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
EnableColumnHeaders bool `yaml:"enableColumnHeaders"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
AllowOnConsole bool `yaml:"allowOnConsole"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
} `yaml:"pcp"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
ConsoleConfig struct {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
Enabled bool `yaml:"enabled"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
FilenameExtension string `yaml:"filenameExtension"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
EnableColumnHeaders bool `yaml:"enableColumnHeaders"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
MinLogLevel string `yaml:"minLogLevel"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
} `yaml:"console"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
SPSConfig struct {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
Enabled bool `yaml:"enabled"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
FilenameExtension string `yaml:"filenameExtension"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
EnableColumnHeaders bool `yaml:"enableColumnHeaders"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
AllowOnConsole bool `yaml:"allowOnConsole"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
} `yaml:"sps"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
TaskDistConfig struct {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
Enabled bool `yaml:"enabled"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
FilenameExtension string `yaml:"filenameExtension"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
EnableColumnHeaders bool `yaml:"enableColumnHeaders"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
AllowOnConsole bool `yaml:"allowOnConsole"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
} `yaml:"clsfnTaskDistOverhead"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
SchedWindowConfig struct {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
Enabled bool `yaml:"enabled"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
FilenameExtension string `yaml:"filenameExtension"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
EnableColumnHeaders bool `yaml:"enableColumnHeaders"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
AllowOnConsole bool `yaml:"allowOnConsole"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
} `yaml:"schedWindow"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
Format[] string `yaml:"format"`
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
}
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
func (c *LoggerConfig) GetConfig() *LoggerConfig {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
yamlFile, err := ioutil.ReadFile(elekEnv.LogConfigYaml)
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
if err != nil {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
log.Printf("yamlFile.Get err #%v ", err)
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
}
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
err = yaml.Unmarshal(yamlFile, c)
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
if err != nil {
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
log.Fatalf("Unmarshal: %v", err)
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
}
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
return c
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
||||
}
|
||||
![]() Are column headers being added if enabled? Are column headers being added if enabled?
![]() Refactor to TaskDistrConfig for semantics. Refactor to TaskDistrConfig for semantics.
![]() ditto. ditto.
![]() The error message does not do justice in indicating the reason for the error. The error message does not do justice in indicating the reason for the error.
![]() ditto. ditto.
![]() That was for future purpose. But I have removed it now That was for future purpose. But I have removed it now
![]() Done Done
![]() Done Done
![]() Changed the error message Changed the error message
![]() Done Done
|
52
elektronLogging/pcpLogger.go
Normal file
|
@ -0,0 +1,52 @@
|
|||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
package elektronLogging
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
import (
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
"os"
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
log "github.com/sirupsen/logrus"
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
//data "github.com/spdfg/elektron/elektronLogging/data"
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
type PcpLogger struct {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
LoggerImpl
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
func NewPcpLogger(logType int, prefix string) *PcpLogger {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
pLog := new(PcpLogger)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
pLog.Type = logType
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
pLog.SetLogFile(prefix)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
return pLog
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
func (pLog *PcpLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
if pLog.Type == logType {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
//logFields := cloneFields(logData)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
log.SetLevel(level)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
if pLog.AllowOnConsole {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
log.SetOutput(os.Stdout)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
log.WithFields(logData).Println(message)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
log.SetOutput(pLog.LogFileName)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
log.WithFields(logData).Println(message)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
if pLog.next != nil {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
pLog.next.Log(logType, level, logData, message)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
func (plog *PcpLogger) SetLogFile(prefix string) {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
pcpLogPrefix := prefix + config.PCPConfig.FilenameExtension
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
if logDir != "" {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
pcpLogPrefix = logDir + "/" + pcpLogPrefix
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
if logFile, err := os.Create(pcpLogPrefix); err != nil {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
log.Fatal("Unable to create logFile: ", err)
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
} else {
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
plog.LogFileName = logFile
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
plog.AllowOnConsole = config.PCPConfig.AllowOnConsole
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
||||
}
|
||||
![]() Refactor to Refactor to `PCPLogger`.
![]() Why not just do this?
Where Why not just do this?
```go
return &PCPLogger{
LoggerIml{
Type: logType
LogFile: CreateLogFile(prefix),
}
}
```
Where `func CreateLogFile(prefix string) string` replaces `func SetLogFile(prefix string)`.
![]() Done Done
|
53
elektronLogging/schedPolicySwitchLogger.go
Normal file
|
@ -0,0 +1,53 @@
|
|||
package elektronLogging
|
||||
|
||||
import (
|
||||
//"fmt"
|
||||
"os"
|
||||
log "github.com/sirupsen/logrus"
|
||||
//data "github.com/spdfg/elektron/elektronLogging/data"
|
||||
)
|
||||
|
||||
type SchedPolicySwitchLogger struct {
|
||||
LoggerImpl
|
||||
}
|
||||
|
||||
func NewSchedPolicySwitchLogger(logType int, prefix string) *SchedPolicySwitchLogger {
|
||||
sLog := new(SchedPolicySwitchLogger)
|
||||
sLog.Type = logType
|
||||
sLog.SetLogFile(prefix)
|
||||
return sLog
|
||||
}
|
||||
|
||||
func (sLog *SchedPolicySwitchLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
if sLog.Type == logType {
|
||||
|
||||
//logFields := cloneFields(logData)
|
||||
|
||||
log.SetLevel(level)
|
||||
|
||||
if sLog.AllowOnConsole {
|
||||
log.SetOutput(os.Stdout)
|
||||
log.WithFields(logData).Println(message)
|
||||
}
|
||||
|
||||
log.SetOutput(sLog.LogFileName)
|
||||
log.WithFields(logData).Println(message)
|
||||
}
|
||||
if sLog.next != nil {
|
||||
sLog.next.Log(logType, level, logData, message)
|
||||
}
|
||||
}
|
||||
|
||||
func (sLog *SchedPolicySwitchLogger) SetLogFile(prefix string) {
|
||||
|
||||
spsLogPrefix := prefix + config.SPSConfig.FilenameExtension
|
||||
if logDir != "" {
|
||||
spsLogPrefix = logDir + "/" + spsLogPrefix
|
||||
}
|
||||
if logFile, err := os.Create(spsLogPrefix); err != nil {
|
||||
log.Fatal("Unable to create logFile: ", err)
|
||||
} else {
|
||||
sLog.LogFileName = logFile
|
||||
sLog.AllowOnConsole = config.SPSConfig.AllowOnConsole
|
||||
}
|
||||
}
|
53
elektronLogging/schedTraceLogger.go
Normal file
|
@ -0,0 +1,53 @@
|
|||
package elektronLogging
|
||||
|
||||
import (
|
||||
//"fmt"
|
||||
"os"
|
||||
log "github.com/sirupsen/logrus"
|
||||
//data "github.com/spdfg/elektron/elektronLogging/data"
|
||||
)
|
||||
|
||||
type SchedTraceLogger struct {
|
||||
LoggerImpl
|
||||
}
|
||||
|
||||
func NewSchedTraceLogger(logType int, prefix string) *SchedTraceLogger {
|
||||
sLog := new(SchedTraceLogger)
|
||||
sLog.Type = logType
|
||||
sLog.SetLogFile(prefix)
|
||||
return sLog
|
||||
}
|
||||
|
||||
func (sLog *SchedTraceLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
if sLog.Type == logType {
|
||||
|
||||
//logFields := cloneFields(logData)
|
||||
|
||||
log.SetLevel(level)
|
||||
|
||||
if sLog.AllowOnConsole {
|
||||
log.SetOutput(os.Stdout)
|
||||
log.WithFields(logData).Println(message)
|
||||
}
|
||||
|
||||
log.SetOutput(sLog.LogFileName)
|
||||
log.WithFields(logData).Println(message)
|
||||
}
|
||||
if sLog.next != nil {
|
||||
sLog.next.Log(logType, level, logData, message)
|
||||
}
|
||||
}
|
||||
|
||||
func (sLog *SchedTraceLogger) SetLogFile(prefix string) {
|
||||
|
||||
schedTraceLogPrefix := prefix + config.SchedTraceConfig.FilenameExtension
|
||||
if logDir != "" {
|
||||
schedTraceLogPrefix = logDir + "/" + schedTraceLogPrefix
|
||||
}
|
||||
if logFile, err := os.Create(schedTraceLogPrefix); err != nil {
|
||||
log.Fatal("Unable to create logFile: ", err)
|
||||
} else {
|
||||
sLog.LogFileName = logFile
|
||||
sLog.AllowOnConsole = config.SchedTraceConfig.AllowOnConsole
|
||||
}
|
||||
}
|
51
elektronLogging/schedWindowLogger.go
Normal file
|
@ -0,0 +1,51 @@
|
|||
package elektronLogging
|
||||
|
||||
import (
|
||||
"os"
|
||||
log "github.com/sirupsen/logrus"
|
||||
//data "github.com/spdfg/elektron/elektronLogging/data"
|
||||
)
|
||||
|
||||
type SchedWindowLogger struct {
|
||||
LoggerImpl
|
||||
}
|
||||
|
||||
func NewSchedWindowLogger(logType int, prefix string) *SchedWindowLogger {
|
||||
sLog := new(SchedWindowLogger)
|
||||
sLog.Type = logType
|
||||
sLog.SetLogFile(prefix)
|
||||
return sLog
|
||||
}
|
||||
|
||||
func (sLog *SchedWindowLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
if sLog.Type == logType {
|
||||
|
||||
//logFields := cloneFields(logData)
|
||||
|
||||
log.SetLevel(level)
|
||||
if sLog.AllowOnConsole {
|
||||
log.SetOutput(os.Stdout)
|
||||
log.WithFields(logData).Println(message)
|
||||
}
|
||||
|
||||
log.SetOutput(sLog.LogFileName)
|
||||
log.WithFields(logData).Println(message)
|
||||
}
|
||||
if sLog.next != nil {
|
||||
sLog.next.Log(logType, level, logData, message)
|
||||
}
|
||||
}
|
||||
|
||||
func (sLog *SchedWindowLogger) SetLogFile(prefix string) {
|
||||
|
||||
schedWindowLogPrefix := prefix + config.SchedWindowConfig.FilenameExtension
|
||||
if logDir != "" {
|
||||
schedWindowLogPrefix = logDir + "/" + schedWindowLogPrefix
|
||||
}
|
||||
if logFile, err := os.Create(schedWindowLogPrefix); err != nil {
|
||||
log.Fatal("Unable to create logFile: ", err)
|
||||
} else {
|
||||
sLog.LogFileName = logFile
|
||||
sLog.AllowOnConsole = config.SchedWindowConfig.AllowOnConsole
|
||||
}
|
||||
}
|
17
elektronLogging/types/types.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package elektronLogging
|
||||
|
||||
import "github.com/fatih/color"
|
||||
|
||||
const (
|
||||
ERROR = iota
|
||||
WARNING = iota
|
||||
GENERAL = iota
|
||||
SUCCESS = iota
|
||||
CONSOLE = iota
|
||||
PCP = iota
|
||||
SCHED_TRACE = iota
|
||||
SPS = iota
|
||||
SCHED_WINDOW = iota
|
||||
CLSFN_TASKDIST_OVERHEAD = iota
|
||||
)
|
||||
|
Formatting
Formatting
Use strings.join instead. You should create the slice and append the message if necessary.
This seems really inefficient. Wouldn't value already have to be a string for this to succeed? In which case, I don't think we gain anything here by suing a sprintf.