sqldb-logger:Go SQL数据库驱动程序的记录器,无需修改现有的* sql.DB stdlib用法-源码

上传者: 42144199 | 上传时间: 2021-01-30 23:04:53 | 文件大小: 430KB | 文件类型: ZIP
SQLDB记录器 Go SQL数据库驱动程序的记录器,无需修改现有的*sql.DB stdlib用法。 上面的彩色控制台编写器输出仅用于示例/开发 产品特点 分级,详细和可日志记录。 继续使用(或重复使用现有的) *sql.DB 通过简单的日志界面带来自己的记录器后端。 可跟踪的日志输出: 每个呼叫都有自己的唯一ID。 准备好的语句和执行将具有相同的ID。 在执行/结果错误时,它将包括查询,参数,参数和相关的ID。 安装 go get -u -v github.com/simukti/sqldb-logger 强烈建议使用依赖管理器(例如或 )进行版本固定。 用法 首先, Logger只是一个简单的界面: type Logger interface { Log ( ctx context. Context , level Level , msg string , data map [ string ] interface {}) } 其中包括4种基本实现,这些实现使用著名的JSON结构化记录器进行快速入门: :使用作为其记录器。 :使用作为其记录器。 :使

文件下载

资源详情

[{"title":"( 51 个子文件 430KB ) sqldb-logger:Go SQL数据库驱动程序的记录器,无需修改现有的* sql.DB stdlib用法-源码","children":[{"title":"sqldb-logger-master","children":[{"title":"sonar-project.properties <span style='color:#111;'> 394B </span>","children":null,"spread":false},{"title":".golangci.yml <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"go.mod <span style='color:#111;'> 314B </span>","children":null,"spread":false},{"title":"rows_test.go <span style='color:#111;'> 10.08KB </span>","children":null,"spread":false},{"title":"connection_test.go <span style='color:#111;'> 29.71KB </span>","children":null,"spread":false},{"title":"logger_test.go <span style='color:#111;'> 9.33KB </span>","children":null,"spread":false},{"title":"transaction.go <span style='color:#111;'> 943B </span>","children":null,"spread":false},{"title":"logadapter","children":[{"title":"logrusadapter","children":[{"title":"go.mod <span style='color:#111;'> 225B </span>","children":null,"spread":false},{"title":"logger_test.go <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"go.sum <span style='color:#111;'> 2.71KB </span>","children":null,"spread":false},{"title":"logger.go <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 376B </span>","children":null,"spread":false}],"spread":true},{"title":"zerologadapter","children":[{"title":"zerolog.jpg <span style='color:#111;'> 79.37KB </span>","children":null,"spread":false},{"title":"go.mod <span style='color:#111;'> 222B </span>","children":null,"spread":false},{"title":"logger_test.go <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false},{"title":"go.sum <span style='color:#111;'> 3.40KB </span>","children":null,"spread":false},{"title":"logger.go <span style='color:#111;'> 979B </span>","children":null,"spread":false},{"title":"console.jpg <span style='color:#111;'> 99.38KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 304B </span>","children":null,"spread":false}],"spread":true},{"title":"onelogadapter","children":[{"title":"go.mod <span style='color:#111;'> 256B </span>","children":null,"spread":false},{"title":"logger_test.go <span style='color:#111;'> 1.61KB </span>","children":null,"spread":false},{"title":"go.sum <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"logger.go <span style='color:#111;'> 1011B </span>","children":null,"spread":false},{"title":"onelog.jpg <span style='color:#111;'> 79.38KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 323B </span>","children":null,"spread":false}],"spread":true},{"title":"zapadapter","children":[{"title":"go.mod <span style='color:#111;'> 212B </span>","children":null,"spread":false},{"title":"logger_test.go <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false},{"title":"go.sum <span style='color:#111;'> 5.84KB </span>","children":null,"spread":false},{"title":"logger.go <span style='color:#111;'> 988B </span>","children":null,"spread":false},{"title":"zap.jpg <span style='color:#111;'> 122.29KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 440B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"go.sum <span style='color:#111;'> 2.11KB </span>","children":null,"spread":false},{"title":"LICENSE.txt <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"logger.go <span style='color:#111;'> 4.10KB </span>","children":null,"spread":false},{"title":"database.go <span style='color:#111;'> 535B </span>","children":null,"spread":false},{"title":"database_test.go <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"options.go <span style='color:#111;'> 10.73KB </span>","children":null,"spread":false},{"title":"connection.go <span style='color:#111;'> 7.74KB </span>","children":null,"spread":false},{"title":".travis.yml <span style='color:#111;'> 675B </span>","children":null,"spread":false},{"title":"statement_test.go <span style='color:#111;'> 18.16KB </span>","children":null,"spread":false},{"title":"test.sh <span style='color:#111;'> 569B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 8.24KB </span>","children":null,"spread":false},{"title":"rows.go <span style='color:#111;'> 3.47KB </span>","children":null,"spread":false},{"title":"connector.go <span style='color:#111;'> 901B </span>","children":null,"spread":false},{"title":"result_test.go <span style='color:#111;'> 2.68KB </span>","children":null,"spread":false},{"title":"statement.go <span style='color:#111;'> 4.28KB </span>","children":null,"spread":false},{"title":"connector_test.go <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 2.14KB </span>","children":null,"spread":false},{"title":"options_test.go <span style='color:#111;'> 7.68KB </span>","children":null,"spread":false},{"title":"transaction_test.go <span style='color:#111;'> 2.23KB </span>","children":null,"spread":false},{"title":"result.go <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明