logconf

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

logrus_conf

logrusの設定を読み込む

setup

go get github.com/sirupsen/logrus
go get github.com/SampleUser0001/logrus_conf
mkdir log

Sample Program

package main

import (
	logconf "github.com/SampleUser0001/logrus_conf"
	"github.com/sirupsen/logrus"
)

func main() {
	logconf.LogConf()
	logconf.Log.WithFields(logrus.Fields{
		"animal": "walrus",
		"size":   10,
	}).Info("A group of walrus emerges from the ocean")
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = logrus.New()

ログインスタンス生成

Functions

func ConfLoad added in v0.0.2

func ConfLoad(confpath string)

func LogConf

func LogConf()

Types

type Config added in v0.0.2

type Config struct {
	ReportCaller bool   `json:"reportCaller"`
	LogFile      string `json:"logFile"`
}

Jump to

Keyboard shortcuts

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