gorm_logrus

package module
v0.2.1-0...-e07cf7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 7 Imported by: 0

README

gorm-logrus

Logrus logger for gorm v2

package main

import (
  "gorm.io/gorm"
  "gorm.io/driver/sqlite"
  "github.com/onrik/gorm-logrus"
)

func main() {
  db, err := gorm.Open(sqlite.Open("test.db"), &gorm.Config{
    Logger: gorm_logrus.New(),
  })
  if err != nil {
    panic("failed to connect database")
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *logger

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL