šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

git.sr.ht/~spc/go-log

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git.sr.ht/~spc/go-log

v0.1.1
Go
Version published
Created
Source

godocs.io builds.sr.ht status Go Report Card

āš ļø Deprecated: use log/slog instead āš ļø

package log

Package log implements a simple level logging package that maintains API compatibility with the standard library log package. It extends the standard library log.Logger type with a Level type that can be used to define output verbosity. It adds additional methods that will be printed only if the logger is configured at or below a given level. For example:

package main

import "git.sr.ht/~spc/go-log"

func main() {
    log.SetLevel(log.LevelWarn)
    log.Traceln("Messages at LevelTrace will not print if the Level is Warn")
    log.Warnln("Messages at LevelTrace will print with the Level set to Warn")
}

FAQs

Package last updated on 20 Dec 2023

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