Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

code.afis.me/logging

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code.afis.me/logging

  • v0.0.0-20210324171325-c8f221b42a4a
  • Go
  • Socket score

Version published
Created
Source

Logging

Small Golang package to output alternative logs

Installation

go get code.afis.me/logging

Example

package main

import (
 "code.afis.me/logging"
)

var logger *logging.Logger
var maxlogsize int64 = 10000

func init() {
 logger := logging.NewLogger("test", []string{"/code.afis.me/logging/"})
 // if you store logs
 store := logging.NewLogsStore(maxlogsize)
 logger.OutputHandler = func(ps *logging.PushLogs) {
  store.Store(true, ps.ID, ps)
 }
 // end if you store logs
}


func main() {
  
 err := fmt.Errorf("Hello")

 // just display error output
 logger.Error(err)

 // if error not nil, then run os.Exit(2)
 logger.Error(err).Quit(err)

 logger.Debug("Hello from golang")
 logger.Warning("Hello from golang")
 logger.Success("Hello from golang")

}

FAQs

Package last updated on 24 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc