WIP : Elektron Logging library #16
|
@ -18,7 +18,7 @@ func NewClsfnTaskDistrOverheadLogger(logType int, prefix string) *ClsfnTaskDistr
|
|||
![]() 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!
|
||||
return cLog
|
||||
}
|
||||
|
||||
func (cLog *ClsfnTaskDistrOverheadLogger) Log(logType int, level log.Level, logData log.Fields, 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!
|
||||
func (cLog ClsfnTaskDistrOverheadLogger) Log(logType int, level log.Level, logData log.Fields, 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 {
|
||||
|
||||
logger.SetLevel(level)
|
||||
|
@ -38,15 +38,14 @@ func (cLog *ClsfnTaskDistrOverheadLogger) Log(logType int, level log.Level, logD
|
|||
![]() 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 *ClsfnTaskDistrOverheadLogger) SetLogFile(prefix string) {
|
||||
|
||||
tskDistLogPrefix := strings.Join([]string{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!
|
||||
filename := strings.Join([]string{prefix, config.TaskDistrConfig.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!
|
||||
dirName := logDir.getDirName()
|
||||
if dirName != "" {
|
||||
tskDistLogPrefix = filepath.Join(dirName, 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!
|
||||
log.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!
|
||||
if logFile, err := os.Create(filepath.Join(dirName, filename)); 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!
|
||||
log.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.TaskDistrConfig.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!
![]() 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!
|
|
@ -17,7 +17,7 @@ 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
![]() 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)
|
||||
return cLog
|
||||
}
|
||||
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
|
||||
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 {
|
||||
|
||||
logger.SetLevel(level)
|
||||
|
@ -35,15 +35,14 @@ func (cLog *ConsoleLogger) Log(logType int, level log.Level, logData log.Fields,
|
|||
![]() 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) {
|
||||
|
||||
consoleLogPrefix := strings.Join([]string{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
|
||||
filename := strings.Join([]string{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
|
||||
dirName := logDir.getDirName()
|
||||
if dirName != "" {
|
||||
consoleLogPrefix = filepath.Join(dirName, 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
|
||||
if logFile, err := os.Create(filepath.Join(dirName, filename)); 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 = config.ConsoleConfig.AllowOnConsole
|
||||
![]() 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
|
|
@ -20,6 +20,7 @@ func (logD *logDirectory) createLogDir(prefix string, startTime time.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
![]() 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 logD.name == "" {
|
||||
// Creating directory to store all logs for this run
|
||||
// directory name format - 2019-November-21_14-33-0
|
||||
![]() 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 := strings.Join([]string{"./", prefix, strconv.Itoa(startTime.Year())}, "")
|
||||
logDirName = strings.Join([]string{logDirName, startTime.Month().String(), strconv.Itoa(startTime.Day())}, "-")
|
||||
logDirName = strings.Join([]string{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
![]() 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
|
|
@ -9,45 +9,40 @@ 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
![]() 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 {
|
||||
SchedTraceConfig struct {
|
||||
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
|
||||
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
|
||||
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"`
|
||||
|
||||
PCPConfig struct {
|
||||
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
|
||||
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
|
||||
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"`
|
||||
|
||||
ConsoleConfig struct {
|
||||
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
|
||||
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
|
||||
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
|
||||
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:"console"`
|
||||
|
||||
SPSConfig struct {
|
||||
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
|
||||
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
|
||||
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"`
|
||||
|
||||
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
|
||||
TaskDistrConfig 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
|
||||
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:"clsfnTaskDistrOverhead"`
|
||||
![]() 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 {
|
||||
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
|
||||
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
|
||||
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"`
|
||||
|
||||
Format []string `yaml:"format"`
|
||||
|
@ -57,11 +52,11 @@ 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)
|
||||
if err != nil {
|
||||
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
|
||||
log.Printf("Error in reading yaml file #%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
|
||||
}
|
||||
err = yaml.Unmarshal(yamlFile, c)
|
||||
if err != nil {
|
||||
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
|
||||
log.Fatalf("Error in yaml 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
|
||||
}
|
||||
|
||||
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
|
|
@ -18,7 +18,7 @@ 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
![]() 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
|
||||
}
|
||||
|
||||
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
|
||||
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 {
|
||||
|
||||
logger.SetLevel(level)
|
||||
|
@ -36,17 +36,16 @@ func (pLog *PcpLogger) Log(logType int, level log.Level, logData log.Fields, mes
|
|||
![]() 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
|
||||
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
|
||||
|
||||
pcpLogPrefix := strings.Join([]string{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
|
||||
filename := strings.Join([]string{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
|
||||
dirName := logDir.getDirName()
|
||||
if dirName != "" {
|
||||
pcpLogPrefix = filepath.Join(dirName, 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
|
||||
if logFile, err := os.Create(filepath.Join(dirName, filename)); 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
![]() 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
|
|
@ -18,7 +18,7 @@ func NewSchedPolicySwitchLogger(logType int, prefix string) *SchedPolicySwitchLo
|
|||
return sLog
|
||||
}
|
||||
|
||||
func (sLog *SchedPolicySwitchLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
func (sLog SchedPolicySwitchLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
if sLog.Type == logType {
|
||||
|
||||
logger.SetLevel(level)
|
||||
|
@ -38,15 +38,14 @@ func (sLog *SchedPolicySwitchLogger) Log(logType int, level log.Level, logData l
|
|||
|
||||
func (sLog *SchedPolicySwitchLogger) SetLogFile(prefix string) {
|
||||
|
||||
spsLogPrefix := strings.Join([]string{prefix, config.SPSConfig.FilenameExtension}, "")
|
||||
filename := strings.Join([]string{prefix, config.SPSConfig.FilenameExtension}, "")
|
||||
dirName := logDir.getDirName()
|
||||
if dirName != "" {
|
||||
spsLogPrefix = filepath.Join(dirName, 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
|
||||
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
|
||||
log.Fatal("Unable to create logFile: ", err)
|
||||
} else {
|
||||
sLog.LogFileName = logFile
|
||||
sLog.AllowOnConsole = config.SPSConfig.AllowOnConsole
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ func NewSchedTraceLogger(logType int, prefix string) *SchedTraceLogger {
|
|||
return sLog
|
||||
}
|
||||
|
||||
func (sLog *SchedTraceLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
func (sLog SchedTraceLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
if sLog.Type == logType {
|
||||
|
||||
logger.SetLevel(level)
|
||||
|
@ -38,15 +38,14 @@ func (sLog *SchedTraceLogger) Log(logType int, level log.Level, logData log.Fiel
|
|||
|
||||
func (sLog *SchedTraceLogger) SetLogFile(prefix string) {
|
||||
|
||||
schedTraceLogPrefix := strings.Join([]string{prefix, config.SchedTraceConfig.FilenameExtension}, "")
|
||||
filename := strings.Join([]string{prefix, config.SchedTraceConfig.FilenameExtension}, "")
|
||||
dirName := logDir.getDirName()
|
||||
if dirName != "" {
|
||||
schedTraceLogPrefix = filepath.Join(dirName, 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
|
||||
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
|
||||
log.Fatal("Unable to create logFile: ", err)
|
||||
} else {
|
||||
sLog.LogFileName = logFile
|
||||
sLog.AllowOnConsole = config.SchedTraceConfig.AllowOnConsole
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ func NewSchedWindowLogger(logType int, prefix string) *SchedWindowLogger {
|
|||
return sLog
|
||||
}
|
||||
|
||||
func (sLog *SchedWindowLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
func (sLog SchedWindowLogger) Log(logType int, level log.Level, logData log.Fields, message string) {
|
||||
if sLog.Type == logType {
|
||||
|
||||
logger.SetLevel(level)
|
||||
|
@ -38,15 +38,14 @@ func (sLog *SchedWindowLogger) Log(logType int, level log.Level, logData log.Fie
|
|||
|
||||
func (sLog *SchedWindowLogger) SetLogFile(prefix string) {
|
||||
|
||||
schedWindowLogPrefix := strings.Join([]string{prefix, config.SchedWindowConfig.FilenameExtension}, "")
|
||||
filename := strings.Join([]string{prefix, config.SchedWindowConfig.FilenameExtension}, "")
|
||||
dirName := logDir.getDirName()
|
||||
if dirName != "" {
|
||||
schedWindowLogPrefix = filepath.Join(dirName, 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
|
||||
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
|
||||
log.Fatal("Unable to create logFile: ", err)
|
||||
} else {
|
||||
sLog.LogFileName = logFile
|
||||
sLog.AllowOnConsole = config.SchedWindowConfig.AllowOnConsole
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,36 +1,30 @@
|
|||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
schedTrace:
|
||||
enabled: true
|
||||
filenameExtension: _schedTrace.log
|
||||
enablecolumnheaders: true
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
allowOnConsole: true
|
||||
sps:
|
||||
enabled: false
|
||||
filenameExtension: _schedPolicySwitch.log
|
||||
enableColumnHeaders: true
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
allowOnConsole: true
|
||||
console:
|
||||
enabled: true
|
||||
filenameExtension: _console.log
|
||||
minLogLevel: debug
|
||||
enableColumnHeaders: true
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
allowOnConsole: true
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
pcp:
|
||||
enabled: true
|
||||
filenameExtension: .pcplog
|
||||
enableColumnHeaders: true
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
allowOnConsole: false
|
||||
schedWindow:
|
||||
enabled: true
|
||||
filenameExtension: _schedWindow.log
|
||||
enableColumnHeaders: true
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
allowOnConsole: true
|
||||
clsfnTaskDistOverhead:
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
clsfnTaskDistrOverhead:
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
enabled: true
|
||||
filenameExtension: _classificationOverhead.log
|
||||
enableColumnHeaders: true
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
allowOnConsole: true
|
||||
|
||||
|
||||
# format.
|
||||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
||||
format:
|
||||
- level
|
||||
- timestamp
|
||||
|
|
|||
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
![]() Inconsistent spacing. Inconsistent spacing.
![]() unnecessary comment. unnecessary comment.
![]() Done Done
![]() Removed Removed
![]() disable schedWindow logging in the log config file that is kept within the repository. disable schedWindow logging in the log config file that is kept within the repository.
![]() ditto ditto
![]() Done Done
![]() Done Done
|
Use struct literals instead of new as it's more descriptive:
&ClsfnTaskDistOverheadLogger{}
Where is log dir coming from? Shouldn't be a global