All Projects → onrik → Logrus

onrik / Logrus

Licence: mit
Hooks for logrus logging

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Logrus

pink-lady
a template project of gin app.
Stars: ✭ 44 (-60%)
Mutual labels:  sentry, gin, gorm
Goweibo
Go Weibo App
Stars: ✭ 243 (+120.91%)
Mutual labels:  echo, gorm, gin
Go Admin
基于Gin + Vue + Element UI的前后端分离权限管理系统脚手架(包含了:多租户的支持,基础用户管理功能,jwt鉴权,代码生成器,RBAC资源控制,表单构建,定时任务等)3分钟构建自己的中后台项目;文档:https://doc.go-admin.dev Demo: https://www.go-admin.dev Antd beta版本:https://preview.go-admin.dev
Stars: ✭ 5,439 (+4844.55%)
Mutual labels:  gin, gorm
Echo Web
Go web framework Echo example. 在线演示☞迁移ing❌
Stars: ✭ 409 (+271.82%)
Mutual labels:  echo, gorm
Ugin
UGin is an API boilerplate written in Go (Golang) with Gin Framework.
Stars: ✭ 110 (+0%)
Mutual labels:  gorm, gin
golang api
This is a source code of my golang restful api series on youtube.
Stars: ✭ 36 (-67.27%)
Mutual labels:  gin, gorm
Aspnetcore Webapi Course
Professional REST API design with ASP.NET Core 3.1 WebAPI
Stars: ✭ 323 (+193.64%)
Mutual labels:  logging, sentry
Snake
🐍 一款小巧的基于Go构建的开发框架,可以快速构建API服务或者Web网站进行业务开发,遵循SOLID设计原则
Stars: ✭ 615 (+459.09%)
Mutual labels:  gorm, gin
Go-Gin-Api
基于golang开源框架 gin封装的api框架
Stars: ✭ 42 (-61.82%)
Mutual labels:  gin, gorm
Wblog
基于gin+gorm开发的个人博客项目
Stars: ✭ 763 (+593.64%)
Mutual labels:  gorm, gin
Go Gin Api
基于 Gin 进行模块化设计的 API 框架,封装了常用功能,使用简单,致力于进行快速的业务研发。比如,支持 cors 跨域、jwt 签名验证、zap 日志收集、panic 异常捕获、trace 链路追踪、prometheus 监控指标、swagger 文档生成、viper 配置文件解析、gorm 数据库组件、gormgen 代码生成工具、graphql 查询语言、errno 统一定义错误码、gRPC 的使用 等等。
Stars: ✭ 730 (+563.64%)
Mutual labels:  gorm, gin
Goforum
Let's go a forum
Stars: ✭ 23 (-79.09%)
Mutual labels:  gorm, gin
lyanna
go的gin框架实现一个博客系统
Stars: ✭ 39 (-64.55%)
Mutual labels:  gin, gorm
goft-gin
基于gin的开发脚手架
Stars: ✭ 108 (-1.82%)
Mutual labels:  gin, gorm
Go Project Sample
Introduce the best practice experience of Go project with a complete project example.通过一个完整的项目示例介绍Go语言项目的最佳实践经验.
Stars: ✭ 344 (+212.73%)
Mutual labels:  gorm, gin
echo-gorm-realworld-app
realworld application built with Golang + Echo + Gorm
Stars: ✭ 18 (-83.64%)
Mutual labels:  echo, gorm
Go Gin Example
An example of gin
Stars: ✭ 4,992 (+4438.18%)
Mutual labels:  gorm, gin
Duckygo
一个同时支持Session以及JWT的高性能高可用 Golang Restful API 脚手架 !
Stars: ✭ 57 (-48.18%)
Mutual labels:  gorm, gin
go-12factor-example
Example the 12factor app using golang
Stars: ✭ 20 (-81.82%)
Mutual labels:  gin, gorm
Go-bjut
A bbs system.
Stars: ✭ 60 (-45.45%)
Mutual labels:  gin, gorm

Hooks for logrus

Example

package main

import (
  "net/http"
  
  "github.com/onrik/logrus/filename"
  "github.com/onrik/logrus/sentry"
  log "github.com/sirupsen/logrus"
)

var (
  dsn = "http://[email protected]/1"
)

func main() {
  filenameHook := filename.NewHook()
  filenameHook.Field = "custom_source_field" // Customize source field name
  log.AddHook(filenameHook)
  
  log.AddHook(sentry.NewHook(sentry.Options{
    Dsn: dsn,
  }, log.PanicLevel, log.FatalLevel, log.ErrorLevel))
  
  log.WithError(err).Error("Dead beef")
}

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].