log

package
v0.0.0-...-3f9ec74 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 11 Imported by: 11

Documentation

Index

Constants

View Source
const (
	FailGetBoletoMessage    = "Falha ao recuperar Boleto"
	SuccessGetBoletoMessage = "Boleto recuperado com sucesso"
)

Variables

View Source
var Operation string

Operation a operacao usada na API

View Source
var Recipient string

Recipient o nome do banco

Functions

func Install

func Install()

Install instala o "servico" de log do SEQ

Types

type Log

type Log struct {
	Operation      string
	Recipient      string
	PayeeGuarantor string
	RequestKey     string
	BankName       string
	IPAddress      string
	ServiceUser    string
	NossoNumero    string
	// contains filtered or unexported fields
}

Log struct com os elementos do log

func CreateLog

func CreateLog() *Log

CreateLog cria uma nova instancia do Log

func (*Log) EndRobot

func (l *Log) EndRobot()

EndRobot loga o fim da execução do robô de recovery

func (*Log) Error

func (l *Log) Error(content interface{}, msg string)

func (*Log) ErrorBasicWithContent

func (l *Log) ErrorBasicWithContent(msg, msgType string, content interface{})

ErrorBasicWithContent Cria um log de erro com as informações básicas e o conteúdo

func (*Log) ErrorWithBasic

func (l *Log) ErrorWithBasic(msg, msgType string, err error)

ErrorWithBasic Cria um log de erro com as informações básicas do log

func (*Log) ErrorWithContent

func (l *Log) ErrorWithContent(msg, msgType string, err error, content interface{})

FallbackErrorWithBasic Cria um log de erro com as informações básicas do log de fallback

func (*Log) Fatal

func (l *Log) Fatal(content interface{}, msg string)

Fatal loga erros da aplicação

func (*Log) GetBoleto

func (l *Log) GetBoleto(content interface{}, msgType string)

GetBoleto Loga mensagem de recuperação de boleto

func (*Log) HandleMaskErrors

func (l *Log) HandleMaskErrors(method string, messageType string, methodContent interface{})

func (*Log) Info

func (l *Log) Info(msg string)

Info loga mensagem do level INFO

func (*Log) InfoWithBasic

func (l *Log) InfoWithBasic(msg, msgType string, params map[string]interface{})

InfoWithBasic Cria um log de information com as informações básicas do log

func (*Log) InfoWithParams

func (l *Log) InfoWithParams(msg, msgType string, params map[string]interface{})

InfoWithParams cria log generico para um map

func (*Log) InitRobot

func (l *Log) InitRobot(totalRecords int)

InitRobot loga o inicio da execução do robô de recovery

func (*Log) Request

func (l *Log) Request(content interface{}, url string, headers map[string]string)

Request loga o request para algum banco

func (*Log) RequestApplication

func (l *Log) RequestApplication(content interface{}, url string, headers map[string]string)

RequestApplication loga o request que chega na boleto api

func (*Log) Response

func (l *Log) Response(content interface{}, url string, headers map[string]string)

Response loga o response para algum banco

func (*Log) ResponseApplication

func (l *Log) ResponseApplication(content interface{}, url string, errorCode string)

ResponseApplication loga o response que sai da boleto api

func (*Log) ResponseApplicationFatal

func (l *Log) ResponseApplicationFatal(content interface{}, url string, errorCode string)

ResponseApplicationFatal loga o response que sai do panic recovery

func (*Log) ResumeRobot

func (l *Log) ResumeRobot(key string)

ResumeRobot loga um resumo de Recovery do robô de recovery

func (*Log) Warn

func (l *Log) Warn(content interface{}, msg string)

Warn loga mensagem do leve Warning

type LogEntry

type LogEntry = map[string]interface{}

type Safe

type Safe struct {
	tracer.Writer
}

func (*Safe) Write

func (s *Safe) Write(entry tracer.Entry)

Jump to

Keyboard shortcuts

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