Conversation
eventmon/monitord/api.go
Outdated
| "sync" | ||
|
|
||
| "github.com/Symantec/Dominator/lib/log" | ||
| // "github.com/Symantec/keymaster/eventmon/tee_logger" |
There was a problem hiding this comment.
Please remove commented-out lines.
| ErrorKeymasterDaemonNotReady = errors.New("keymasterd not ready") | ||
| One = systeelogger.New() | ||
| Two = nulllogger.New() //remain for the future use | ||
| Teelog teelogger.Logger |
There was a problem hiding this comment.
Unless these need to be exported, please make these private to the package.
| webLoginChannel := make(chan string, bufferLength) | ||
| x509RawCertChannel := make(chan []byte, bufferLength) | ||
| x509CertChannel := make(chan *x509.Certificate, bufferLength) | ||
| Teelog := teelogger.New(One, Two) |
There was a problem hiding this comment.
I think it's cleaner to create the two loggers here and then create the teelogger.
| x509RawCertChannel := make(chan []byte, bufferLength) | ||
| x509CertChannel := make(chan *x509.Certificate, bufferLength) | ||
| Teelog := teelogger.New(One, Two) | ||
| defer One.Close() |
There was a problem hiding this comment.
I think this will cause system logging to fail once you return from this function.
| keymasterStatus: make(map[string]error), | ||
| } | ||
| go monitor.monitorForever(logger) | ||
| go monitor.monitorForever(logger, Teelog) |
There was a problem hiding this comment.
Why are you adding a second logger parameter? I was expecting that the teelogger would replace the logger in the parameter list.
What is the goal? To send all logs to both loggers? Or is that not the case?
| @@ -0,0 +1,39 @@ | |||
| package systeelogger | |||
There was a problem hiding this comment.
This is not a teelogger. I suggest calling this package "syslogger".
|
|
||
| const ( | ||
| priority = syslog.LOG_AUTHPRIV | ||
| log_name = "keymaster" |
There was a problem hiding this comment.
I think these should be passed in when creating the syslogger.
|
@cviecco: Please also take a look. |
No description provided.