orm

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

* @Author: hongliu * @Date: 2022-09-23 10:10:16 * @LastEditors: hongliu * @LastEditTime: 2022-09-23 10:10:21 * @FilePath: \common\infra\orm\formatter.go * @Description: orm封装日志 * * Copyright (c) 2022 by 洪流, All Rights Reserved.

* @Author: hongliu * @Date: 2022-09-21 16:59:20 * @LastEditors: hongliu * @LastEditTime: 2022-10-20 14:54:17 * @FilePath: \common\infra\orm\orm.go * @Description:Orm基础设施实现 * * Copyright (c) 2022 by 洪流, All Rights Reserved.

* @Author: hongliu * @Date: 2022-09-23 10:13:07 * @LastEditors: hongliu * @LastEditTime: 2022-10-20 14:53:55 * @FilePath: \common\infra\orm\orm_implemention.go * @Description:orm接口实现 * * Copyright (c) 2022 by 洪流, All Rights Reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ormConfig *config.OrmInfraConfig) common.OrmInfra

New 创建orm基础设施

Types

type Formatter

type Formatter struct {
	FieldsOrder     []string // default: fields sorted alphabetically
	TimestampFormat string   // default: time.StampMilli = "Jan _2 15:04:05.000"
	HideKeys        bool     // show [fieldValue] instead of [fieldKey:fieldValue]
	NoColors        bool     // disable colors
	NoFieldsColors  bool     // color only level, default is level + fields
	ShowFullLevel   bool     // true to show full level [WARNING] instead [WARN]
	TrimMessages    bool     // true to trim whitespace on messages
}

Formatter 自定义格式控制选项

func (*Formatter) Format

func (f *Formatter) Format(entry *logrus.Entry) ([]byte, error)

Format 自定义格式函数

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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