highlightzap

package module
v0.0.0-...-547aa23 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 8 Imported by: 0

README

Go Report

Highlight Zap

A simple zapcore.Core implementation to integrate with Highlight.

To use, initialize highlight like normal, create a new HighlightCore, then wrap with a NewTee. See the example code for a detailed example.

Testing

To test this code use HL_PROJECT_ID=MY_HIGHLIGHT_TOKEN go test

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HighlightCore

type HighlightCore struct {
	zapcore.LevelEnabler
	// contains filtered or unexported fields
}

func NewHighlightCore

func NewHighlightCore(minLevel zapcore.Level) *HighlightCore

NewHighlightCore creates a new core to transmit logs to highlight. Highlight token and other options should be set before creating a new core

func (*HighlightCore) Check

func (c *HighlightCore) Check(entry zapcore.Entry, checkedEntry *zapcore.CheckedEntry) *zapcore.CheckedEntry

Check determines if this should be sent to roll bar based on LevelEnabler

func (*HighlightCore) Sync

func (c *HighlightCore) Sync() error

func (*HighlightCore) With

func (c *HighlightCore) With(fields []zapcore.Field) zapcore.Core

With provides structure

func (*HighlightCore) Write

func (c *HighlightCore) Write(entry zapcore.Entry, fields []zapcore.Field) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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