lgs

package module
v0.0.0-...-20db09f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 5 Imported by: 1

README

Log-Http

This is a powerful logger for services.

Installation

Install and start the server.

$ go run main.go
$ go get github.com/gerardoCD/log-http-go 

Import in your project


import (
	lgs "github.com/gerardoCD/log-http-go"
)

Features!

  • Mark init service
  • Mark end service
  • Reponse Services
  • Reponde middleware service
  • Log Info
  • Log Error

Examples!



func main() {
	lgs.Begin("Name Service")
	lgs.Request("{\"hola\":4}")
	lgs.ReponseService(201,"{\"hola\":4}", "http://app/getElement", "Get Element")
	lgs.Reponse(200,"{\"hola\":4}")
	lgs.Info("Log random")
	lgs.Error("Error Fatal")
}
  

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Begin

func Begin(name string)

func End

func End()

func Error

func Error(err string)

func Info

func Info(info string)

func Reponse

func Reponse(statusCode int, object interface{})

func ReponseService

func ReponseService(statusCode int, object interface{}, url string, name string)

func ReponseServiceString

func ReponseServiceString(statusCode int, json string, url string, name string)

func ReponseServiceStringXML

func ReponseServiceStringXML(statusCode int, xml string, url string, name string)

func ReponseServiceXML

func ReponseServiceXML(statusCode int, object interface{}, url string, name string)

func Request

func Request(object interface{})

func RequestService

func RequestService(object interface{}, url string, name string)

func RequestServiceString

func RequestServiceString(json string, url string, name string)

func RequestServiceStringXML

func RequestServiceStringXML(xml string, url string, name string)

func RequestServiceXML

func RequestServiceXML(object interface{}, url string, name string)

func TestFuntion

func TestFuntion() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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