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

Initial support for stdlib logger #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Initial support for stdlib logger #28

wants to merge 2 commits into from

Conversation

dfava
Copy link
Contributor

@dfava dfava commented Oct 31, 2024

No description provided.

@dfava dfava force-pushed the stdlog.and.examples branch 2 times, most recently from 5fa5229 to bd83775 Compare October 31, 2024 12:28
@@ -109,37 +107,3 @@ func logrusEmitLogEntry(logger logrus.FieldLogger, level logrus.Level) {
panic(fmt.Sprintf("Log level %d not handled in logrusEmitLogEntry", level))
}
}

func ParseSQLUUIDBytes(v []uint8) (uuid.UUID, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this function to a common file

"github.com/sirupsen/logrus"
)

func StdMSSQLLogger(logger *log.Logger) RowsLogger {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It accepts the standard library logger; but not that the implementation itself uses a bit of code from logrus. We can change the internals later, if we want to. But having a dependency with logrus is not a problem since we need to support it anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are just "nice to have".

@dfava dfava force-pushed the stdlog.and.examples branch from bd83775 to 4200d55 Compare October 31, 2024 12:47
@dfava dfava force-pushed the stdlog.and.examples branch from 4200d55 to 1f7fcdc Compare October 31, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant