Skip to content
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

feat: logger for output & errors #48

Merged
merged 1 commit into from Jun 15, 2021
Merged

feat: logger for output & errors #48

merged 1 commit into from Jun 15, 2021

Conversation

ankithans
Copy link
Member

@ankithans ankithans commented Jun 14, 2021

Description

  • implement top level factory for commands
  • logger for printing output and error
    • not a complete logger though, just implemented two methods
    • lot of useful methods & options can be added in logger
  • use factory with logger in plugins
  • import plugins into Host

want to validate, if this is a fine approach?

@ankithans ankithans added the enhancement New feature or request label Jun 14, 2021
@ankithans ankithans requested a review from wtrocki June 14, 2021 13:53
@ankithans ankithans self-assigned this Jun 14, 2021
@ankithans
Copy link
Member Author

@wtrocki

@wtrocki
Copy link
Contributor

wtrocki commented Jun 15, 2021

Good start

@@ -0,0 +1,6 @@
package logging

type Logger interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs please

return
}

func (l *StdLogger) Output(args ...interface{}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs

@wtrocki wtrocki merged commit fae8236 into main Jun 15, 2021
@wtrocki wtrocki deleted the cobra-plugins branch June 15, 2021 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants