From bb8c0a79d6b5a38ebf4e37d0fb90407b27220876 Mon Sep 17 00:00:00 2001 From: balandi1 Date: Tue, 26 Nov 2019 13:19:15 -0500 Subject: [PATCH] Minor code improvements Removed commented code. Resolved spacing issue in yaml. --- elektronLogging/ElektronFormatter.go | 3 +-- logConfig.yaml | 18 +++++++++--------- schedulers/helpers.go | 8 -------- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/elektronLogging/ElektronFormatter.go b/elektronLogging/ElektronFormatter.go index c54fc6a..066cb95 100644 --- a/elektronLogging/ElektronFormatter.go +++ b/elektronLogging/ElektronFormatter.go @@ -40,8 +40,7 @@ func (f ElektronFormatter) Format(entry *log.Entry) ([]byte, error) { var formattedFields []string for key, value := range entry.Data { - formattedFields = append(formattedFields, - strings.Join([]string{key, value.(string)}, "=")) + formattedFields = append(formattedFields, strings.Join([]string{key, value.(string)}, "=")) } b.WriteString(message) diff --git a/logConfig.yaml b/logConfig.yaml index 9c4302b..70d5260 100644 --- a/logConfig.yaml +++ b/logConfig.yaml @@ -12,17 +12,17 @@ console: minLogLevel: debug allowOnConsole: true pcp: - enabled: true - filenameExtension: .pcplog - allowOnConsole: false + enabled: true + filenameExtension: .pcplog + allowOnConsole: false schedWindow: - enabled: true - filenameExtension: _schedWindow.log - allowOnConsole: true + enabled: true + filenameExtension: _schedWindow.log + allowOnConsole: true clsfnTaskDistrOverhead: - enabled: true - filenameExtension: _classificationOverhead.log - allowOnConsole: true + enabled: true + filenameExtension: _classificationOverhead.log + allowOnConsole: true format: diff --git a/schedulers/helpers.go b/schedulers/helpers.go index 252190e..f69375d 100644 --- a/schedulers/helpers.go +++ b/schedulers/helpers.go @@ -134,14 +134,6 @@ func WithPCPLog(pcpLog chan struct{}) SchedulerOptions { } } -/*func WithLoggingChannels(lmt chan elekLogDef.LogMessageType, msg chan string) SchedulerOptions { - return func(s ElectronScheduler) error { - s.(*BaseScheduler).logMsgType = lmt - s.(*BaseScheduler).logMsg = msg - return nil - } -}*/ - func WithSchedPolSwitchEnabled(enableSchedPolicySwitch bool, switchingCriteria string) SchedulerOptions { return func(s ElectronScheduler) error { s.(*BaseScheduler).schedPolSwitchEnabled = enableSchedPolicySwitch