Skip to content

Initial support for stdlib logger - #28

Open
dfava wants to merge 2 commits into
mainfrom
stdlog.and.examples
Open

Initial support for stdlib logger#28
dfava wants to merge 2 commits into
mainfrom
stdlog.and.examples

Conversation

@dfava

@dfava dfava commented Oct 31, 2024

Copy link
Copy Markdown
Contributor

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
Comment thread querysql/logrusmssql.go
}
}

func ParseSQLUUIDBytes(v []uint8) (uuid.UUID, error) {

Copy link
Copy Markdown
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

Comment thread querysql/logmssql.go
"github.com/sirupsen/logrus"
)

func StdMSSQLLogger(logger *log.Logger) RowsLogger {

Copy link
Copy Markdown
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
Copy Markdown
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