WIP : Elektron Logging library #16

Merged
balandi1 merged 50 commits from master into master 2019-12-10 01:15:34 +00:00
20 changed files with 396 additions and 250 deletions
Showing only changes of commit 6fb0e4a3fe - Show all commits

View file

@ -52,7 +52,7 @@ func (tc TasksToClassify) taskObservationCalculator(task Task) []float64 {
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
} else if task.Watts != 0.0 {
return []float64{task.Watts}
} else {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.FatalLevel, "Unable to classify tasks. Missing Watts or ClassToWatts attribute in workload")
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
elekLog.Log(elekLogTypes.CONSOLE, log.FatalLevel, "Unable to classify tasks. Missing Watts or ClassToWatts attribute in workload")
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
return []float64{0.0} // Won't reach here.
}
}
@ -107,7 +107,7 @@ func clusterSizeAvgMMMPU(tasks []Task, taskObservation func(task Task) []float64
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
} else {
ridv commented 2019-11-19 02:56:12 +00:00 (Migrated from github.com)

Is Logf an option here instead of sprinting?

Is Logf an option here instead of sprinting?
pradykaushik commented 2019-11-21 00:38:18 +00:00 (Migrated from github.com)

Replace elekLogT.ERROR with elekLogT.CONSOLE.

Replace `elekLogT.ERROR` with `elekLogT.CONSOLE`.
pradykaushik commented 2019-11-21 00:39:20 +00:00 (Migrated from github.com)

err.Error() returns the string representation.

`err.Error()` returns the string representation.
balandi1 commented 2019-11-21 18:07:17 +00:00 (Migrated from github.com)

Yes. I will work on implementing Logf()

Yes. I will work on implementing Logf()
balandi1 commented 2019-11-21 19:59:56 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-11-21 20:07:53 +00:00 (Migrated from github.com)

Okay. Will do the change

Okay. Will do the change
// skip this value
// there is an error in the task config.
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.ErrorLevel, err.Error())
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
elekLog.Log(elekLogTypes.CONSOLE, log.ErrorLevel, err.Error())
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
}
} else {
// There is only one observation for the task.

pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done
pradykaushik commented 2019-11-21 00:31:57 +00:00 (Migrated from github.com)

I would alias this to elekLog as you seem to be using that prefix when aliasing imports of sub-packages.

I would alias this to _elekLog_ as you seem to be using that prefix when aliasing imports of sub-packages.
balandi1 commented 2019-11-21 19:30:07 +00:00 (Migrated from github.com)

Okay. Done

Okay. Done

View file

@ -9,25 +9,43 @@ import (
)
type ClsfnTaskDistrOverheadLogger struct {
loggerImpl
baseElektronLogger
}
func NewClsfnTaskDistrOverheadLogger(b *baseLogData, logType int, prefix string,
logger *log.Logger, logDir *logDirectory) *ClsfnTaskDistrOverheadLogger {
cLog := &ClsfnTaskDistrOverheadLogger{}
cLog.logType = logType
cLog.logDir = logDir
cLog.next = nil
cLog.baseLogData = b
cLog.logger = logger
func NewClsfnTaskDistrOverheadLogger(
config *LoggerConfig,
b *baseLogData,
logType int,
prefix string,
logger *log.Logger,
logDir *logDirectory) *ClsfnTaskDistrOverheadLogger {
cLog := &ClsfnTaskDistrOverheadLogger{
baseElektronLogger: baseElektronLogger{
baseLogData: b,
config: struct {
Enabled bool
FilenameExtension string
AllowOnConsole bool
}{
Enabled: config.TaskDistrConfig.Enabled,
FilenameExtension: config.TaskDistrConfig.FilenameExtension,
AllowOnConsole: config.TaskDistrConfig.AllowOnConsole,
},
logType: logType,
next: nil,
logger: logger,
logDir: logDir,
},
}
cLog.createLogFile(prefix)
return cLog
}
func (cLog ClsfnTaskDistrOverheadLogger) Log(logType int, level log.Level, message string) {
if cLog.logType == logType {
if config.TaskDistrConfig.Enabled {
if cLog.allowOnConsole {
if cLog.isEnabled() {
if cLog.config.AllowOnConsole {
cLog.logger.SetOutput(os.Stdout)
cLog.logger.WithFields(cLog.data).Log(level, message)
}
@ -47,8 +65,8 @@ func (cLog ClsfnTaskDistrOverheadLogger) Log(logType int, level log.Level, messa
func (cLog ClsfnTaskDistrOverheadLogger) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
if cLog.logType == logType {
if config.TaskDistrConfig.Enabled {
if cLog.allowOnConsole {
if cLog.isEnabled() {
if cLog.config.AllowOnConsole {
cLog.logger.SetOutput(os.Stdout)
cLog.logger.WithFields(cLog.data).Logf(level, msgFmtString, args...)
}
@ -67,15 +85,14 @@ func (cLog ClsfnTaskDistrOverheadLogger) Logf(logType int, level log.Level, msgF
func (cLog *ClsfnTaskDistrOverheadLogger) createLogFile(prefix string) {
if config.TaskDistrConfig.Enabled {
filename := strings.Join([]string{prefix, config.TaskDistrConfig.FilenameExtension}, "")
if cLog.isEnabled() {
filename := strings.Join([]string{prefix, cLog.config.FilenameExtension}, "")
dirName := cLog.logDir.getDirName()
if dirName != "" {
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.logFile = logFile
cLog.allowOnConsole = config.TaskDistrConfig.AllowOnConsole
}
}
}

View file

@ -9,23 +9,46 @@ import (
)
type ConsoleLogger struct {
loggerImpl
baseElektronLogger
MinLogLevel string
}
func NewConsoleLogger(b *baseLogData, logType int, prefix string,
logger *log.Logger, logDir *logDirectory) *ConsoleLogger {
cLog := &ConsoleLogger{}
cLog.logType = logType
cLog.logDir = logDir
cLog.next = nil
cLog.baseLogData = b
cLog.logger = logger
func NewConsoleLogger(
config *LoggerConfig,
b *baseLogData,
logType int,
prefix string,
logger *log.Logger,
logDir *logDirectory) *ConsoleLogger {
cLog := &ConsoleLogger{
baseElektronLogger: baseElektronLogger{
baseLogData: b,
config: struct {
Enabled bool
FilenameExtension string
AllowOnConsole bool
}{
Enabled: config.ConsoleConfig.Enabled,
FilenameExtension: config.ConsoleConfig.FilenameExtension,
AllowOnConsole: config.ConsoleConfig.AllowOnConsole,
},
logType: logType,
next: nil,
logger: logger,
logDir: logDir,
},
MinLogLevel: config.ConsoleConfig.MinLogLevel,
}
cLog.createLogFile(prefix)
return cLog
}
func (cLog ConsoleLogger) Log(logType int, level log.Level, message string) {
if logType <= cLog.logType {
if config.ConsoleConfig.Enabled {
if cLog.isEnabled() {
cLog.logger.SetOutput(os.Stdout)
cLog.logger.WithFields(cLog.data).Log(level, message)
@ -44,7 +67,7 @@ func (cLog ConsoleLogger) Log(logType int, level log.Level, message string) {
func (cLog ConsoleLogger) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
if logType <= cLog.logType {
if config.ConsoleConfig.Enabled {
if cLog.isEnabled() {
cLog.logger.SetOutput(os.Stdout)
cLog.logger.WithFields(cLog.data).Logf(level, msgFmtString, args...)
@ -62,8 +85,8 @@ func (cLog ConsoleLogger) Logf(logType int, level log.Level, msgFmtString string
func (cLog *ConsoleLogger) createLogFile(prefix string) {
// Create log file for the type if it is enabled.
if config.ConsoleConfig.Enabled {
filename := strings.Join([]string{prefix, config.ConsoleConfig.FilenameExtension}, "")
if cLog.isEnabled() {
filename := strings.Join([]string{prefix, cLog.config.FilenameExtension}, "")
dirName := cLog.logDir.getDirName()
fmt.Println(dirName)
if dirName != "" {
@ -71,7 +94,6 @@ func (cLog *ConsoleLogger) createLogFile(prefix string) {
log.Fatal("Unable to create logFile: ", err)
} else {
cLog.logFile = logFile
cLog.allowOnConsole = config.ConsoleConfig.AllowOnConsole
}
}
}

View file

@ -1,6 +1,7 @@
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
package logging
import (
"github.com/pkg/errors"
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
"os"
"strings"
"time"
@ -9,14 +10,75 @@ import (
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
. "github.com/spdfg/elektron/logging/types"
)
var config LoggerConfig
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
// var config LoggerConfig
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
var formatter ElektronFormatter
var ElektronLogger *loggerImpl
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
var elektronLoggerInstance elektronLogger
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func BuildLogger(prefix string, logConfigFilename string) {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
type elektronLogger interface {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
setNext(next elektronLogger)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
isEnabled() bool
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
Log(logType int, level log.Level, message string)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
Logf(logType int, level log.Level, msgFmtString string, args ...interface{})
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
WithFields(logData log.Fields) elektronLogger
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
WithField(key string, value string) elektronLogger
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
// Read configuration from yaml.
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
config.GetConfig(logConfigFilename)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
type baseLogData struct {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
data log.Fields
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
type baseElektronLogger struct {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
*baseLogData
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
config struct {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
Enabled bool
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
FilenameExtension string
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
AllowOnConsole bool
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
logType int
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
logFile *os.File
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
next elektronLogger
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
logger *log.Logger
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
logDir *logDirectory
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func (l baseElektronLogger) isEnabled() bool {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
return l.config.Enabled
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func (l *baseElektronLogger) WithFields(logData log.Fields) elektronLogger {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
l.data = logData
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
return l
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func (l *baseElektronLogger) WithField(key string, value string) elektronLogger {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
l.data[key] = value
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
return l
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func (l *baseElektronLogger) setNext(next elektronLogger) {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
l.next = next
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func (l baseElektronLogger) Log(logType int, level log.Level, message string) {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
if l.next != nil {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
l.next.Log(logType, level, message)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func (l baseElektronLogger) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
if l.next != nil {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
l.next.Logf(logType, level, msgFmtString, args...)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func (l *baseElektronLogger) resetFields() {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
l.data = nil
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
l.data = log.Fields{}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func BuildLogger(prefix string, logConfigFilename string) error {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
// Create the log directory.
startTime := time.Now()
@ -35,20 +97,44 @@ func BuildLogger(prefix string, logConfigFilename string) {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
// Create a chain of loggers.
b := &baseLogData{data: log.Fields{}}
head := &loggerImpl{baseLogData: b}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
cLog := NewConsoleLogger(b, CONSOLE, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pLog := NewPCPLogger(b, PCP, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
schedTraceLog := NewSchedTraceLogger(b, SCHED_TRACE, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
spsLog := NewSchedPolicySwitchLogger(b, SPS, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
schedWindowLog := NewSchedWindowLogger(b, SCHED_WINDOW, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
tskDistLog := NewClsfnTaskDistrOverheadLogger(b, CLSFN_TASKDISTR_OVERHEAD, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
head := &baseElektronLogger{baseLogData: b}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
head.setNext(cLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
cLog.setNext(pLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pLog.setNext(schedTraceLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
schedTraceLog.setNext(spsLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
spsLog.setNext(schedWindowLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
schedWindowLog.setNext(tskDistLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
// Read configuration from yaml.
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
if config, err := GetConfig(logConfigFilename); err != nil {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
return errors.Wrap(err, "Failed to build logger")
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
} else {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
cLog := NewConsoleLogger(config, b, CONSOLE, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pLog := NewPCPLogger(config, b, PCP, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
schedTraceLog := NewSchedTraceLogger(config, b, SCHED_TRACE, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
spsLog := NewSchedPolicySwitchLogger(config, b, SPS, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
schedWindowLog := NewSchedWindowLogger(config, b, SCHED_WINDOW, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
tskDistLog := NewClsfnTaskDistrOverheadLogger(config, b, CLSFN_TASKDISTR_OVERHEAD, prefix, logger, logDir)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
ElektronLogger = head
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
head.setNext(cLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
cLog.setNext(pLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pLog.setNext(schedTraceLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
schedTraceLog.setNext(spsLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
spsLog.setNext(schedWindowLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
schedWindowLog.setNext(tskDistLog)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
elektronLoggerInstance = head
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
return nil
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func Log(logType int, level log.Level, message string) {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
elektronLoggerInstance.Log(logType, level, message)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
elektronLoggerInstance.Logf(logType, level, msgFmtString, args...)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func WithFields(logData log.Fields) elektronLogger {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
return elektronLoggerInstance.WithFields(logData)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
func WithField(key string, value string) elektronLogger {
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
return elektronLoggerInstance.WithField(key, value)
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
}

pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done
pradykaushik commented 2019-12-06 22:03:56 +00:00 (Migrated from github.com)

isEnabled() does not have to be part of the interface.

`isEnabled()` does not have to be part of the interface.
pradykaushik commented 2019-12-06 22:04:02 +00:00 (Migrated from github.com)

ditto

ditto
pradykaushik commented 2019-12-06 22:04:11 +00:00 (Migrated from github.com)

ditto

ditto
balandi1 commented 2019-12-09 15:41:29 +00:00 (Migrated from github.com)

Yes. Removed it from there

Yes. Removed it from there
balandi1 commented 2019-12-09 15:42:13 +00:00 (Migrated from github.com)

Done

Done
balandi1 commented 2019-12-09 15:42:23 +00:00 (Migrated from github.com)

Done

Done

View file

@ -1,56 +0,0 @@
package logging
import (
log "github.com/sirupsen/logrus"
"os"
)
type logInterface interface {
setNext(logType logInterface)
Log(logType int, level log.Level, message string)
Logf(logType int, level log.Level, msgFmtString string, args ...interface{})
createLogFile(prefix string)
}
type baseLogData struct {
data log.Fields
}
type loggerImpl struct {
*baseLogData
logType int
allowOnConsole bool
logFile *os.File
next logInterface
logger *log.Logger
logDir *logDirectory
}
func (l *loggerImpl) WithFields(logData log.Fields) *loggerImpl {
l.data = logData
return l
}
func (l *loggerImpl) WithField(key string, value string) *loggerImpl {
l.data[key] = value
return l
}
func (l *loggerImpl) setNext(logType logInterface) {
l.next = logType
}
func (l loggerImpl) Log(logType int, level log.Level, message string) {
if l.next != nil {
l.next.Log(logType, level, message)
}
}
func (l loggerImpl) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
if l.next != nil {
l.next.Logf(logType, level, msgFmtString, args...)
}
}
func (l *loggerImpl) resetFields() {
l.data = nil
l.data = log.Fields{}
}

View file

@ -1,6 +1,7 @@
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
package logging
import (
"github.com/pkg/errors"
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
"io/ioutil"
@ -47,16 +48,18 @@ type LoggerConfig struct {
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
Format []string `yaml:"format"`
}
func (c *LoggerConfig) GetConfig(logConfigFilename string) *LoggerConfig {
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
func GetConfig(logConfigFilename string) (*LoggerConfig, error) {
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
yamlFile, err := ioutil.ReadFile(logConfigFilename)
if err != nil {
log.Printf("Error in reading yaml file #%v ", err)
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
return nil, errors.Wrap(err, "failed to read log config file")
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
}
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
c := &LoggerConfig{}
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
err = yaml.Unmarshal(yamlFile, c)
if err != nil {
log.Fatalf("Error in unmarshalling yaml: %v", err)
}
return c
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
return c, nil
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
}

pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .
pradykaushik commented 2019-12-06 22:05:07 +00:00 (Migrated from github.com)

does this need to be exported outside the package?

does this need to be exported outside the package?
balandi1 commented 2019-12-09 16:03:06 +00:00 (Migrated from github.com)

No, not needed. Changed it to getConfig .

No, not needed. Changed it to `getConfig` .

View file

@ -9,25 +9,44 @@ import (
)
type PCPLogger struct {
loggerImpl
baseElektronLogger
}
func NewPCPLogger(b *baseLogData, logType int, prefix string,
logger *log.Logger, logDir *logDirectory) *PCPLogger {
pLog := &PCPLogger{}
pLog.logType = logType
pLog.logDir = logDir
pLog.next = nil
pLog.baseLogData = b
pLog.logger = logger
func NewPCPLogger(
config *LoggerConfig,
b *baseLogData,
logType int,
prefix string,
logger *log.Logger,
logDir *logDirectory) *PCPLogger {
pLog := &PCPLogger{
baseElektronLogger: baseElektronLogger{
baseLogData: b,
config: struct {
Enabled bool
FilenameExtension string
AllowOnConsole bool
}{
Enabled: config.PCPConfig.Enabled,
FilenameExtension: config.PCPConfig.FilenameExtension,
AllowOnConsole: config.PCPConfig.AllowOnConsole,
},
logType: logType,
next: nil,
logger: logger,
logDir: logDir,
},
}
pLog.createLogFile(prefix)
return pLog
}
func (pLog PCPLogger) Log(logType int, level log.Level, message string) {
if pLog.logType == logType {
if config.PCPConfig.Enabled {
if pLog.allowOnConsole {
if pLog.isEnabled() {
if pLog.config.AllowOnConsole {
pLog.logger.SetOutput(os.Stdout)
pLog.logger.WithFields(pLog.data).Log(level, message)
}
@ -46,8 +65,8 @@ func (pLog PCPLogger) Log(logType int, level log.Level, message string) {
func (pLog PCPLogger) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
if pLog.logType == logType {
if config.PCPConfig.Enabled {
if pLog.allowOnConsole {
if pLog.isEnabled() {
if pLog.config.AllowOnConsole {
pLog.logger.SetOutput(os.Stdout)
pLog.logger.WithFields(pLog.data).Logf(level, msgFmtString, args...)
}
@ -66,15 +85,14 @@ func (pLog PCPLogger) Logf(logType int, level log.Level, msgFmtString string, ar
}
func (pLog *PCPLogger) createLogFile(prefix string) {
if config.PCPConfig.Enabled {
filename := strings.Join([]string{prefix, config.PCPConfig.FilenameExtension}, "")
if pLog.isEnabled() {
filename := strings.Join([]string{prefix, pLog.config.FilenameExtension}, "")
dirName := pLog.logDir.getDirName()
if dirName != "" {
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
pLog.logFile = logFile
pLog.allowOnConsole = config.PCPConfig.AllowOnConsole
}
}
}

View file

@ -9,25 +9,44 @@ import (
)
type SchedPolicySwitchLogger struct {
loggerImpl
baseElektronLogger
}
func NewSchedPolicySwitchLogger(b *baseLogData, logType int, prefix string,
logger *log.Logger, logDir *logDirectory) *SchedPolicySwitchLogger {
sLog := &SchedPolicySwitchLogger{}
sLog.logType = logType
sLog.logDir = logDir
sLog.next = nil
sLog.baseLogData = b
sLog.logger = logger
func NewSchedPolicySwitchLogger(
config *LoggerConfig,
b *baseLogData,
logType int,
prefix string,
logger *log.Logger,
logDir *logDirectory) *SchedPolicySwitchLogger {
sLog := &SchedPolicySwitchLogger{
baseElektronLogger: baseElektronLogger{
baseLogData: b,
config: struct {
Enabled bool
FilenameExtension string
AllowOnConsole bool
}{
Enabled: config.SPSConfig.Enabled,
FilenameExtension: config.SPSConfig.FilenameExtension,
AllowOnConsole: config.SPSConfig.AllowOnConsole,
},
logType: logType,
next: nil,
logger: logger,
logDir: logDir,
},
}
sLog.createLogFile(prefix)
return sLog
}
func (sLog SchedPolicySwitchLogger) Log(logType int, level log.Level, message string) {
if sLog.logType == logType {
if config.SPSConfig.Enabled {
if sLog.allowOnConsole {
if sLog.isEnabled() {
if sLog.config.AllowOnConsole {
sLog.logger.SetOutput(os.Stdout)
sLog.logger.WithFields(sLog.data).Log(level, message)
}
@ -46,8 +65,8 @@ func (sLog SchedPolicySwitchLogger) Log(logType int, level log.Level, message st
func (sLog SchedPolicySwitchLogger) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
if sLog.logType == logType {
if config.SPSConfig.Enabled {
if sLog.allowOnConsole {
if sLog.isEnabled() {
if sLog.config.AllowOnConsole {
sLog.logger.SetOutput(os.Stdout)
sLog.logger.WithFields(sLog.data).Logf(level, msgFmtString, args...)
}
@ -66,15 +85,14 @@ func (sLog SchedPolicySwitchLogger) Logf(logType int, level log.Level, msgFmtStr
}
func (sLog *SchedPolicySwitchLogger) createLogFile(prefix string) {
if config.SPSConfig.Enabled {
filename := strings.Join([]string{prefix, config.SPSConfig.FilenameExtension}, "")
if sLog.isEnabled() {
filename := strings.Join([]string{prefix, sLog.config.FilenameExtension}, "")
dirName := sLog.logDir.getDirName()
if dirName != "" {
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
sLog.logFile = logFile
sLog.allowOnConsole = config.SPSConfig.AllowOnConsole
}
}
}

View file

@ -9,25 +9,44 @@ import (
)
type SchedTraceLogger struct {
loggerImpl
baseElektronLogger
}
func NewSchedTraceLogger(b *baseLogData, logType int, prefix string,
logger *log.Logger, logDir *logDirectory) *SchedTraceLogger {
sLog := &SchedTraceLogger{}
sLog.logType = logType
sLog.logDir = logDir
sLog.next = nil
sLog.baseLogData = b
sLog.logger = logger
func NewSchedTraceLogger(
config *LoggerConfig,
b *baseLogData,
logType int,
prefix string,
logger *log.Logger,
logDir *logDirectory) *SchedTraceLogger {
sLog := &SchedTraceLogger{
baseElektronLogger: baseElektronLogger{
baseLogData: b,
config: struct {
Enabled bool
FilenameExtension string
AllowOnConsole bool
}{
Enabled: config.SchedTraceConfig.Enabled,
FilenameExtension: config.SchedTraceConfig.FilenameExtension,
AllowOnConsole: config.SchedTraceConfig.AllowOnConsole,
},
logType: logType,
next: nil,
logger: logger,
logDir: logDir,
},
}
sLog.createLogFile(prefix)
return sLog
}
func (sLog SchedTraceLogger) Log(logType int, level log.Level, message string) {
if sLog.logType == logType {
if config.SchedTraceConfig.Enabled {
if sLog.allowOnConsole {
if sLog.isEnabled() {
if sLog.config.AllowOnConsole {
sLog.logger.SetOutput(os.Stdout)
sLog.logger.WithFields(sLog.data).Log(level, message)
}
@ -46,8 +65,8 @@ func (sLog SchedTraceLogger) Log(logType int, level log.Level, message string) {
func (sLog SchedTraceLogger) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
if sLog.logType == logType {
if config.SchedTraceConfig.Enabled {
if sLog.allowOnConsole {
if sLog.isEnabled() {
if sLog.config.AllowOnConsole {
sLog.logger.SetOutput(os.Stdout)
sLog.logger.WithFields(sLog.data).Logf(level, msgFmtString, args...)
}
@ -66,15 +85,14 @@ func (sLog SchedTraceLogger) Logf(logType int, level log.Level, msgFmtString str
}
func (sLog *SchedTraceLogger) createLogFile(prefix string) {
if config.SchedTraceConfig.Enabled {
filename := strings.Join([]string{prefix, config.SchedTraceConfig.FilenameExtension}, "")
if sLog.isEnabled() {
filename := strings.Join([]string{prefix, sLog.config.FilenameExtension}, "")
dirName := sLog.logDir.getDirName()
if dirName != "" {
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
sLog.logFile = logFile
sLog.allowOnConsole = config.SchedTraceConfig.AllowOnConsole
}
}
}

View file

@ -9,25 +9,44 @@ import (
)
type SchedWindowLogger struct {
loggerImpl
baseElektronLogger
}
func NewSchedWindowLogger(b *baseLogData, logType int, prefix string,
logger *log.Logger, logDir *logDirectory) *SchedWindowLogger {
sLog := &SchedWindowLogger{}
sLog.logType = logType
sLog.logDir = logDir
sLog.next = nil
sLog.baseLogData = b
sLog.logger = logger
func NewSchedWindowLogger(
config *LoggerConfig,
b *baseLogData,
logType int,
prefix string,
logger *log.Logger,
logDir *logDirectory) *SchedWindowLogger {
sLog := &SchedWindowLogger{
baseElektronLogger: baseElektronLogger{
baseLogData: b,
config: struct {
Enabled bool
FilenameExtension string
AllowOnConsole bool
}{
Enabled: config.SchedWindowConfig.Enabled,
FilenameExtension: config.SchedWindowConfig.FilenameExtension,
AllowOnConsole: config.SchedWindowConfig.AllowOnConsole,
},
logType: logType,
next: nil,
logger: logger,
logDir: logDir,
},
}
sLog.createLogFile(prefix)
return sLog
}
func (sLog SchedWindowLogger) Log(logType int, level log.Level, message string) {
if sLog.logType == logType {
if config.SchedWindowConfig.Enabled {
if sLog.allowOnConsole {
if sLog.isEnabled() {
if sLog.config.AllowOnConsole {
sLog.logger.SetOutput(os.Stdout)
sLog.logger.WithFields(sLog.data).Log(level, message)
}
@ -47,8 +66,8 @@ func (sLog SchedWindowLogger) Log(logType int, level log.Level, message string)
func (sLog SchedWindowLogger) Logf(logType int, level log.Level, msgFmtString string, args ...interface{}) {
if sLog.logType == logType {
if config.SchedWindowConfig.Enabled {
if sLog.allowOnConsole {
if sLog.isEnabled() {
if sLog.config.AllowOnConsole {
sLog.logger.SetOutput(os.Stdout)
sLog.logger.WithFields(sLog.data).Logf(level, msgFmtString, args...)
}
@ -66,15 +85,14 @@ func (sLog SchedWindowLogger) Logf(logType int, level log.Level, msgFmtString st
}
func (sLog *SchedWindowLogger) createLogFile(prefix string) {
if config.SchedWindowConfig.Enabled {
filename := strings.Join([]string{prefix, config.SchedWindowConfig.FilenameExtension}, "")
if sLog.isEnabled() {
filename := strings.Join([]string{prefix, sLog.config.FilenameExtension}, "")
dirName := sLog.logDir.getDirName()
if dirName != "" {
if logFile, err := os.Create(filepath.Join(dirName, filename)); err != nil {
log.Fatal("Unable to create logFile: ", err)
} else {
sLog.logFile = logFile
sLog.allowOnConsole = config.SchedWindowConfig.AllowOnConsole
}
}
}

View file

@ -1,4 +1,4 @@
package elektronLogging
package types
const (
CONSOLE = iota

View file

@ -47,7 +47,7 @@ func Start(quit chan struct{}, logging *bool, pcpConfigFile string) {
scanner.Scan()
// Write to logfile
elekLog.ElektronLogger.Log(elekLogTypes.PCP, log.InfoLevel, scanner.Text())
elekLog.Log(elekLogTypes.PCP, log.InfoLevel, scanner.Text())
// Throw away first set of results
scanner.Scan()
@ -58,14 +58,14 @@ func Start(quit chan struct{}, logging *bool, pcpConfigFile string) {
text := scanner.Text()
if *logging {
elekLog.ElektronLogger.Log(elekLogTypes.PCP, log.InfoLevel, text)
elekLog.Log(elekLogTypes.PCP, log.InfoLevel, text)
}
seconds++
}
}(logging)
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "PCP logging started")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "PCP logging started")
if err := cmd.Start(); err != nil {
log.Fatal(err)
@ -75,7 +75,7 @@ func Start(quit chan struct{}, logging *bool, pcpConfigFile string) {
select {
case <-quit:
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Stopping PCP logging in 5 seconds")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Stopping PCP logging in 5 seconds")
time.Sleep(5 * time.Second)
// http://stackoverflow.com/questions/22470193/why-wont-go-kill-a-child-process-correctly

View file

@ -43,7 +43,7 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
if hiThreshold < loThreshold {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "High threshold is lower than low threshold!")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "High threshold is lower than low threshold!")
}
pipe, err := cmd.StdoutPipe()
@ -59,7 +59,7 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
scanner.Scan()
// Write to logfile
elekLog.ElektronLogger.Log(elekLogTypes.PCP, log.InfoLevel, scanner.Text())
elekLog.Log(elekLogTypes.PCP, log.InfoLevel, scanner.Text())
headers := strings.Split(scanner.Text(), ",")
@ -95,12 +95,12 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
if *logging {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Logging PCP...")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Logging PCP...")
text := scanner.Text()
split := strings.Split(text, ",")
elekLog.ElektronLogger.Log(elekLogTypes.PCP, log.InfoLevel, text)
elekLog.Log(elekLogTypes.PCP, log.InfoLevel, text)
totalPower := 0.0
for _, powerIndex := range powerIndexes {
@ -111,7 +111,7 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
powerHistories[host].Value = power
powerHistories[host] = powerHistories[host].Next()
elekLog.ElektronLogger.WithFields(log.Fields{"Host": fmt.Sprintf("%s", indexToHost[powerIndex]),
elekLog.WithFields(log.Fields{"Host": fmt.Sprintf("%s", indexToHost[powerIndex]),
"Power": fmt.Sprintf("%f", (power * pcp.RAPLUnits))}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
totalPower += power
@ -123,11 +123,11 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
clusterMean := pcp.AverageClusterPowerHistory(clusterPowerHist)
elekLog.ElektronLogger.WithFields(log.Fields{"Total power": fmt.Sprintf("%f %d", clusterPower, clusterPowerHist.Len()),
elekLog.WithFields(log.Fields{"Total power": fmt.Sprintf("%f %d", clusterPower, clusterPowerHist.Len()),
"Sec Avg": fmt.Sprintf("%f", clusterMean)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
if clusterMean > hiThreshold {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE,
elekLog.Log(elekLogTypes.CONSOLE,
log.InfoLevel, "Need to cap a node")
// Create statics for all victims and choose one to cap
victims := make([]pcp.Victim, 0, 8)
@ -149,10 +149,10 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
if !cappedHosts[victim.Host] {
cappedHosts[victim.Host] = true
orderCapped = append(orderCapped, victim.Host)
elekLog.ElektronLogger.WithFields(log.Fields{"Capping Victim": fmt.Sprintf("%s", victim.Host),
elekLog.WithFields(log.Fields{"Capping Victim": fmt.Sprintf("%s", victim.Host),
"Avg. Wattage": fmt.Sprintf("%f", victim.Watts*pcp.RAPLUnits)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
if err := rapl.Cap(victim.Host, "rapl", 50); err != nil {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE,
elekLog.Log(elekLogTypes.CONSOLE,
log.ErrorLevel,
"Error capping host")
}
@ -168,9 +168,9 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
cappedHosts[host] = false
// User RAPL package to send uncap.
log.Printf("Uncapping host %s", host)
elekLog.ElektronLogger.WithFields(log.Fields{"Uncapped host": host}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
elekLog.WithFields(log.Fields{"Uncapped host": host}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
if err := rapl.Cap(host, "rapl", 100); err != nil {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.ErrorLevel, "Error capping host")
elekLog.Log(elekLogTypes.CONSOLE, log.ErrorLevel, "Error capping host")
}
}
}
@ -180,7 +180,7 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
}
}(logging, hiThreshold, loThreshold)
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "PCP logging started")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "PCP logging started")
if err := cmd.Start(); err != nil {
log.Fatal(err)
@ -190,7 +190,7 @@ func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThresh
select {
case <-quit:
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Stopping PCP logging in 5 seconds")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Stopping PCP logging in 5 seconds")
time.Sleep(5 * time.Second)
// http://stackoverflow.com/questions/22470193/why-wont-go-kill-a-child-process-correctly

View file

@ -56,7 +56,7 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
if hiThreshold < loThreshold {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "High threshold is lower than low threshold!")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "High threshold is lower than low threshold!")
}
pipe, err := cmd.StdoutPipe()
@ -72,7 +72,7 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
scanner.Scan()
// Write to logfile
elekLog.ElektronLogger.Log(elekLogTypes.PCP, log.InfoLevel, scanner.Text())
elekLog.Log(elekLogTypes.PCP, log.InfoLevel, scanner.Text())
headers := strings.Split(scanner.Text(), ",")
@ -111,11 +111,11 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
for scanner.Scan() {
if *logging {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Logging PCP...")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Logging PCP...")
split := strings.Split(scanner.Text(), ",")
text := scanner.Text()
elekLog.ElektronLogger.Log(elekLogTypes.PCP, log.InfoLevel, text)
elekLog.Log(elekLogTypes.PCP, log.InfoLevel, text)
totalPower := 0.0
for _, powerIndex := range powerIndexes {
@ -126,7 +126,7 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
powerHistories[host].Value = power
powerHistories[host] = powerHistories[host].Next()
elekLog.ElektronLogger.WithFields(log.Fields{"Host": fmt.Sprintf("%s", indexToHost[powerIndex]),
elekLog.WithFields(log.Fields{"Host": fmt.Sprintf("%s", indexToHost[powerIndex]),
"Power": fmt.Sprintf("%f", (power * pcp.RAPLUnits))}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
totalPower += power
}
@ -137,15 +137,15 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
clusterMean := pcp.AverageClusterPowerHistory(clusterPowerHist)
elekLog.ElektronLogger.WithFields(log.Fields{"Total power": fmt.Sprintf("%f %d", clusterPower, clusterPowerHist.Len()),
elekLog.WithFields(log.Fields{"Total power": fmt.Sprintf("%f %d", clusterPower, clusterPowerHist.Len()),
"Sec Avg": fmt.Sprintf("%f", clusterMean)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
if clusterMean >= hiThreshold {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Need to cap a node")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Need to cap a node")
elekLog.ElektronLogger.WithFields(log.Fields{"Cap values of capped victims": fmt.Sprintf("%v", cappedVictims)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
elekLog.WithFields(log.Fields{"Cap values of capped victims": fmt.Sprintf("%v", cappedVictims)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
elekLog.ElektronLogger.WithFields(log.Fields{"Cap values of victims to uncap": fmt.Sprintf("%v", orderCappedVictims)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
elekLog.WithFields(log.Fields{"Cap values of victims to uncap": fmt.Sprintf("%v", orderCappedVictims)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
// Create statics for all victims and choose one to cap
victims := make([]pcp.Victim, 0, 8)
@ -173,10 +173,10 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
// Need to cap this victim.
if err := rapl.Cap(victims[i].Host, "rapl", 50.0); err != nil {
elekLog.ElektronLogger.WithFields(log.Fields{"Error capping host": fmt.Sprintf("%s", victims[i].Host)}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "")
elekLog.WithFields(log.Fields{"Error capping host": fmt.Sprintf("%s", victims[i].Host)}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "")
} else {
elekLog.ElektronLogger.Logf(elekLogTypes.CONSOLE, log.InfoLevel, "Capped host[%s] at %f", victims[i].Host, 50.0)
elekLog.Logf(elekLogTypes.CONSOLE, log.InfoLevel, "Capped host[%s] at %f", victims[i].Host, 50.0)
// Keeping track of this victim and it's cap value
cappedVictims[victims[i].Host] = 50.0
newVictimFound = true
@ -200,10 +200,10 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
newCapValue := getNextCapValue(capValue, 2)
if err := rapl.Cap(alreadyCappedHosts[i], "rapl", newCapValue); err != nil {
elekLog.ElektronLogger.WithFields(log.Fields{"Error capping host": fmt.Sprintf("%s", alreadyCappedHosts[i])}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "")
elekLog.WithFields(log.Fields{"Error capping host": fmt.Sprintf("%s", alreadyCappedHosts[i])}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "")
} else {
// Successful cap
elekLog.ElektronLogger.Logf(elekLogTypes.CONSOLE, log.InfoLevel,
elekLog.Logf(elekLogTypes.CONSOLE, log.InfoLevel,
"Capped host[%s] at %f", alreadyCappedHosts[i], newCapValue)
// Checking whether this victim can be capped further
if newCapValue <= constants.LowerCapLimit {
@ -227,15 +227,15 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
}
}
if !canCapAlreadyCappedVictim {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "No Victim left to cap")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "No Victim left to cap")
}
}
} else if clusterMean < loThreshold {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Need to uncap a node")
elekLog.ElektronLogger.WithFields(log.Fields{"Cap values of capped victims": fmt.Sprintf("%v", cappedVictims)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
elekLog.ElektronLogger.WithFields(log.Fields{"Cap values of victims to uncap": fmt.Sprintf("%v", orderCappedVictims)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Need to uncap a node")
elekLog.WithFields(log.Fields{"Cap values of capped victims": fmt.Sprintf("%v", cappedVictims)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
elekLog.WithFields(log.Fields{"Cap values of victims to uncap": fmt.Sprintf("%v", orderCappedVictims)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
if len(orderCapped) > 0 {
// We pick the host that is capped the most to uncap.
orderCappedToSort := utilities.GetPairList(orderCappedVictims)
@ -246,10 +246,10 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
newUncapValue := orderCappedVictims[hostToUncap] * 2.0
if err := rapl.Cap(hostToUncap, "rapl", newUncapValue); err != nil {
elekLog.ElektronLogger.WithFields(log.Fields{"Error uncapping host": fmt.Sprintf("%s", hostToUncap)}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "")
elekLog.WithFields(log.Fields{"Error uncapping host": fmt.Sprintf("%s", hostToUncap)}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "")
} else {
// Successful uncap
elekLog.ElektronLogger.Logf(elekLogTypes.CONSOLE, log.InfoLevel, "Uncapped host[%s] to %f", hostToUncap, newUncapValue)
elekLog.Logf(elekLogTypes.CONSOLE, log.InfoLevel, "Uncapped host[%s] to %f", hostToUncap, newUncapValue)
// Can we uncap this host further. If not, then we remove its entry from orderCapped
if newUncapValue >= 100.0 { // can compare using ==
// Deleting entry from orderCapped
@ -270,7 +270,7 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
}
}
} else {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "No host staged for Uncapped")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "No host staged for Uncapped")
}
}
}
@ -279,7 +279,7 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
}(logging, hiThreshold, loThreshold)
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "PCP logging started")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "PCP logging started")
if err := cmd.Start(); err != nil {
log.Fatal(err)
}
@ -288,7 +288,7 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, hiTh
select {
case <-quit:
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Stopping PCP logging in 5 seconds")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Stopping PCP logging in 5 seconds")
time.Sleep(5 * time.Second)
// http://stackoverflow.com/questions/22470193/why-wont-go-kill-a-child-process-correctly

View file

@ -226,8 +226,11 @@ func main() {
if strings.Contains(*pcplogPrefix, "/") {
log.Fatal("log file prefix should not contain '/'.")
}
// Build Logger for elektron.
elekLog.BuildLogger(*pcplogPrefix, *logConfigFilename)
// Build Logger.
if err := elekLog.BuildLogger(*pcplogPrefix, *logConfigFilename); err != nil {
log.Fatal(err)
}
// Starting PCP logging.
if noPowercap {
@ -282,8 +285,8 @@ func main() {
// Starting the scheduler driver.
if status, err := driver.Run(); err != nil {
elekLog.ElektronLogger.WithFields(log.Fields{"status": status.String(), "error": err.Error()}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"status": status.String(), "error": err.Error()}).Log(elekLogTypes.CONSOLE,
log.ErrorLevel, "Framework stopped ")
}
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Exiting...")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Exiting...")
}

View file

@ -250,30 +250,29 @@ func (s *BaseScheduler) StatusUpdate(driver sched.SchedulerDriver, status *mesos
func (s *BaseScheduler) LogTaskStarting(ts *def.Task, offer *mesos.Offer) {
if ts == nil {
elekLog.ElektronLogger.WithFields(log.Fields{"host": fmt.Sprintf("%s", offer.GetHostname())}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "TASKS STARTING...")
elekLog.WithFields(log.Fields{"host": fmt.Sprintf("%s", offer.GetHostname())}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "TASKS STARTING...")
} else {
elekLog.ElektronLogger.WithFields(log.Fields{"task": fmt.Sprintf("%s", ts.Name),
"Instance": fmt.Sprintf("%d", *ts.Instances), "host": fmt.Sprintf("%s", offer.GetHostname())}).Log(elekLogTypes.CONSOLE,
log.InfoLevel, "TASK STARTING... ")
elekLog.WithFields(log.Fields{"task": fmt.Sprintf("%s", ts.Name), "Instance": fmt.Sprintf("%d", *ts.Instances),
"host": fmt.Sprintf("%s", offer.GetHostname())}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "TASK STARTING... ")
}
}
func (s *BaseScheduler) LogTaskWattsConsideration(ts def.Task, host string, wattsToConsider float64) {
elekLog.ElektronLogger.WithFields(log.Fields{"task": ts.Name, "host": host, "Watts": fmt.Sprintf("%f", wattsToConsider)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "Watts considered for ")
elekLog.WithFields(log.Fields{"task": ts.Name, "host": host, "Watts": fmt.Sprintf("%f", wattsToConsider)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "Watts considered for ")
}
func (s *BaseScheduler) LogOffersReceived(offers []*mesos.Offer) {
elekLog.ElektronLogger.WithFields(log.Fields{"Resource offers received": fmt.Sprintf("%d", len(offers))}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"Resource offers received": fmt.Sprintf("%d", len(offers))}).Log(elekLogTypes.CONSOLE,
log.InfoLevel, "")
}
func (s *BaseScheduler) LogNoPendingTasksDeclineOffers(offer *mesos.Offer) {
elekLog.ElektronLogger.WithFields(log.Fields{"DECLINING OFFER for host": fmt.Sprintf("%s", offer.GetHostname())}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"DECLINING OFFER for host": fmt.Sprintf("%s", offer.GetHostname())}).Log(elekLogTypes.CONSOLE,
log.WarnLevel, "No tasks left to schedule ")
}
func (s *BaseScheduler) LogNumberOfRunningTasks() {
elekLog.ElektronLogger.WithFields(log.Fields{"Number of tasks still Running": fmt.Sprintf("%d", s.tasksRunning)}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"Number of tasks still Running": fmt.Sprintf("%d", s.tasksRunning)}).Log(elekLogTypes.CONSOLE,
log.InfoLevel, "")
}
@ -284,67 +283,67 @@ func (s *BaseScheduler) LogCoLocatedTasks(slaveID string) {
buffer.WriteString(fmt.Sprintln(taskName))
}
s.TasksRunningMutex.Unlock()
elekLog.ElektronLogger.WithFields(log.Fields{"Colocated with": fmt.Sprintf("%s", buffer.String())}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"Colocated with": fmt.Sprintf("%s", buffer.String())}).Log(elekLogTypes.CONSOLE,
log.InfoLevel, "")
}
func (s *BaseScheduler) LogSchedTrace(taskToSchedule *mesos.TaskInfo, offer *mesos.Offer) {
elekLog.ElektronLogger.WithFields(log.Fields{offer.GetHostname(): fmt.Sprintf("%s", taskToSchedule.GetTaskId().GetValue())}).Log(elekLogTypes.SCHED_TRACE, log.InfoLevel, "")
elekLog.WithFields(log.Fields{offer.GetHostname(): fmt.Sprintf("%s", taskToSchedule.GetTaskId().GetValue())}).Log(elekLogTypes.SCHED_TRACE, log.InfoLevel, "")
}
func (s *BaseScheduler) LogTerminateScheduler() {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Done scheduling all tasks!")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "Done scheduling all tasks!")
}
func (s *BaseScheduler) LogInsufficientResourcesDeclineOffer(offer *mesos.Offer,
offerResources ...interface{}) {
buffer := bytes.Buffer{}
buffer.WriteString(fmt.Sprintf("<CPU: %f, RAM: %f, Watts: %f>", offerResources...))
elekLog.ElektronLogger.WithFields(log.Fields{"Offer Resources": fmt.Sprintf("%s", buffer.String())}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"Offer Resources": fmt.Sprintf("%s", buffer.String())}).Log(elekLogTypes.CONSOLE,
log.WarnLevel, "DECLINING OFFER... Offer has insufficient resources to launch a task")
}
func (s *BaseScheduler) LogOfferRescinded(offerID *mesos.OfferID) {
elekLog.ElektronLogger.WithFields(log.Fields{"OfferID": fmt.Sprintf("%s", offerID)}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"OfferID": fmt.Sprintf("%s", offerID)}).Log(elekLogTypes.CONSOLE,
log.ErrorLevel, "OFFER RESCINDED")
}
func (s *BaseScheduler) LogSlaveLost(slaveID *mesos.SlaveID) {
elekLog.ElektronLogger.WithFields(log.Fields{"SlaveID": fmt.Sprintf("%s", slaveID)}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"SlaveID": fmt.Sprintf("%s", slaveID)}).Log(elekLogTypes.CONSOLE,
log.ErrorLevel, "SLAVE LOST")
}
func (s *BaseScheduler) LogExecutorLost(executorID *mesos.ExecutorID, slaveID *mesos.SlaveID) {
elekLog.ElektronLogger.WithFields(log.Fields{"ExecutorID": fmt.Sprintf("%s", executorID), "SlaveID": fmt.Sprintf("%s", slaveID)}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "EXECUTOR LOST")
elekLog.WithFields(log.Fields{"ExecutorID": fmt.Sprintf("%s", executorID), "SlaveID": fmt.Sprintf("%s", slaveID)}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "EXECUTOR LOST")
}
func (s *BaseScheduler) LogFrameworkMessage(executorID *mesos.ExecutorID,
slaveID *mesos.SlaveID, message string) {
elekLog.ElektronLogger.WithFields(log.Fields{"Received Framework message from executor": executorID}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"Received Framework message from executor": executorID}).Log(elekLogTypes.CONSOLE,
log.InfoLevel, message)
}
func (s *BaseScheduler) LogMesosError(err string) {
elekLog.ElektronLogger.WithFields(log.Fields{"MESOS CONSOLE": fmt.Sprintf("%v", err)}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"MESOS CONSOLE": fmt.Sprintf("%v", err)}).Log(elekLogTypes.CONSOLE,
log.ErrorLevel, "")
}
func (s *BaseScheduler) LogElectronError(err error) {
elekLog.ElektronLogger.WithFields(log.Fields{"ELECTRON CONSOLE": fmt.Sprintf("%v", err)}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "")
elekLog.WithFields(log.Fields{"ELECTRON CONSOLE": fmt.Sprintf("%v", err)}).Log(elekLogTypes.CONSOLE, log.ErrorLevel, "")
}
func (s *BaseScheduler) LogFrameworkRegistered(frameworkID *mesos.FrameworkID,
masterInfo *mesos.MasterInfo) {
elekLog.ElektronLogger.WithFields(log.Fields{"frameworkID": fmt.Sprintf("%s", frameworkID), "master": fmt.Sprintf("%v", masterInfo)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "FRAMEWORK REGISTERED!")
elekLog.WithFields(log.Fields{"frameworkID": fmt.Sprintf("%s", frameworkID), "master": fmt.Sprintf("%v", masterInfo)}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "FRAMEWORK REGISTERED!")
}
func (s *BaseScheduler) LogFrameworkReregistered(masterInfo *mesos.MasterInfo) {
elekLog.ElektronLogger.WithFields(log.Fields{"master": fmt.Sprintf("%v", masterInfo)}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"master": fmt.Sprintf("%v", masterInfo)}).Log(elekLogTypes.CONSOLE,
log.InfoLevel, "Framework re-registered")
}
func (s *BaseScheduler) LogDisconnected() {
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.WarnLevel, "Framework disconnected with master")
elekLog.Log(elekLogTypes.CONSOLE, log.WarnLevel, "Framework disconnected with master")
}
func (s *BaseScheduler) LogTaskStatusUpdate(status *mesos.TaskStatus) {
@ -356,12 +355,12 @@ func (s *BaseScheduler) LogTaskStatusUpdate(status *mesos.TaskStatus) {
default:
level = log.InfoLevel
}
elekLog.ElektronLogger.WithFields(log.Fields{"task": fmt.Sprintf("%s", *status.TaskId.Value), "state": NameFor(status.State)}).Log(elekLogTypes.CONSOLE, level, "Task Status received")
elekLog.WithFields(log.Fields{"task": fmt.Sprintf("%s", *status.TaskId.Value), "state": NameFor(status.State)}).Log(elekLogTypes.CONSOLE, level, "Task Status received")
}
func (s *BaseScheduler) LogSchedPolicySwitch(name string, nextPolicy SchedPolicyState) {
logSPS := func() {
elekLog.ElektronLogger.WithFields(log.Fields{"Name": name}).Log(elekLogTypes.SPS, log.InfoLevel, "")
elekLog.WithFields(log.Fields{"Name": name}).Log(elekLogTypes.SPS, log.InfoLevel, "")
}
if s.hasReceivedResourceOffers && (s.curSchedPolicy != nextPolicy) {
logSPS()
@ -370,10 +369,10 @@ func (s *BaseScheduler) LogSchedPolicySwitch(name string, nextPolicy SchedPolicy
}
// Logging the size of the scheduling window and the scheduling policy
// that is going to schedule the tasks in the scheduling window.
elekLog.ElektronLogger.WithFields(log.Fields{"Window size": fmt.Sprintf("%d", s.schedWindowSize), "Name": name}).Log(elekLogTypes.SCHED_WINDOW, log.InfoLevel, "")
elekLog.WithFields(log.Fields{"Window size": fmt.Sprintf("%d", s.schedWindowSize), "Name": name}).Log(elekLogTypes.SCHED_WINDOW, log.InfoLevel, "")
}
func (s *BaseScheduler) LogClsfnAndTaskDistOverhead(overhead time.Duration) {
// Logging the overhead in microseconds.
elekLog.ElektronLogger.WithFields(log.Fields{"Overhead in microseconds": fmt.Sprintf("%f", float64(overhead.Nanoseconds())/1000.0)}).Log(elekLogTypes.CLSFN_TASKDISTR_OVERHEAD, log.InfoLevel, "")
elekLog.WithFields(log.Fields{"Overhead in microseconds": fmt.Sprintf("%f", float64(overhead.Nanoseconds())/1000.0)}).Log(elekLogTypes.CLSFN_TASKDISTR_OVERHEAD, log.InfoLevel, "")
}

View file

@ -36,10 +36,10 @@ import (
func coLocated(tasks map[string]bool, s BaseScheduler) {
for _, task := range tasks {
elekLog.ElektronLogger.WithFields(log.Fields{"Task": task}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
elekLog.WithFields(log.Fields{"Task": task}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "")
}
elekLog.ElektronLogger.Log(elekLogTypes.CONSOLE, log.InfoLevel, "---------------------")
elekLog.Log(elekLogTypes.CONSOLE, log.InfoLevel, "---------------------")
}
// Get the powerClass of the given hostname.

View file

@ -90,7 +90,7 @@ func switchTaskDistBased(baseSchedRef *BaseScheduler) string {
// Determine the distribution of tasks in the new scheduling window.
taskDist, err := def.GetTaskDistributionInWindow(baseSchedRef.schedWindowSize, baseSchedRef.tasks)
baseSchedRef.LogClsfnAndTaskDistOverhead(time.Now().Sub(startTime))
elekLog.ElektronLogger.WithFields(log.Fields{"Task Distribution": fmt.Sprintf("%f", taskDist)}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"Task Distribution": fmt.Sprintf("%f", taskDist)}).Log(elekLogTypes.CONSOLE,
log.InfoLevel, "Switching... ")
if err != nil {
// All the tasks in the window were only classified into 1 cluster.

View file

@ -90,12 +90,12 @@ func UpdateEnvironment(offer *mesos.Offer) {
var host = offer.GetHostname()
// If this host is not present in the set of hosts.
if _, ok := constants.Hosts[host]; !ok {
elekLog.ElektronLogger.WithFields(log.Fields{"Adding host": host}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "New host detected")
elekLog.WithFields(log.Fields{"Adding host": host}).Log(elekLogTypes.CONSOLE, log.InfoLevel, "New host detected")
// Add this host.
constants.Hosts[host] = struct{}{}
// Get the power class of this host.
class := PowerClass(offer)
elekLog.ElektronLogger.WithFields(log.Fields{"host": host, "PowerClass": class}).Log(elekLogTypes.CONSOLE,
elekLog.WithFields(log.Fields{"host": host, "PowerClass": class}).Log(elekLogTypes.CONSOLE,
log.InfoLevel, "Registering the power class...")
// If new power class, register the power class.
if _, ok := constants.PowerClasses[class]; !ok {

View file

@ -78,7 +78,7 @@ func (s *fillNextOfferCycle) apply(taskQueue []def.Task) (int, int) {
for _, task := range taskQueue {
numberOfTasksTraversed++
for i := *task.Instances; i > 0; i-- {
elekLog.ElektronLogger.Logf(elekLogTypes.CONSOLE, log.InfoLevel,
elekLog.Logf(elekLogTypes.CONSOLE, log.InfoLevel,
"Checking if Instance #%d of Task[%s] can be scheduled "+
"during the next offer cycle...", i, task.Name)
if canSchedule(task) {