-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some functions to make it easier to migrate from Pitaya V1 #376
Conversation
session/static.go
Outdated
// New returns a new session instance | ||
// a NetworkEntity is a low-level network instance | ||
func New(entity networkentity.NetworkEntity, frontend bool, UID ...string) Session { | ||
DefaultSessionPool = NewSessionPool() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended that you are resetting the DefaultSessionPool every time you create a new session isntance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this method, It doesn't make sense to be here I just used it for testing on Zooba
logger/interfaces/interfaces.go
Outdated
@@ -29,4 +31,6 @@ type Logger interface { | |||
WithFields(fields map[string]interface{}) Logger | |||
WithField(key string, value interface{}) Logger | |||
WithError(err error) Logger | |||
|
|||
LogrusLogger() logrus.FieldLogger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain the need for this method? It sounds a bit weird that we are tying our generic Logger interface to Logrus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in a few places I need to get the internal logger that this interface uses, how about this?
GetInternalLogger() any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we define the internal logger as another interface rather than using any?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this GetInternalLogger() logrus.FieldLogger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no because this interface is too extensive and use internal logrus stuff
Pull Request Test Coverage Report for Build 7225116265
💛 - Coveralls |
No description provided.