natzap

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 4 Imported by: 0

README

Natzap

Natzap is an extension to the logging package zap.

It can send fire-and-forget log messages to a subject, or it can send ACK'd log messages to a stream via JetStream.

License

This package is released under MIT license.

Authors

Created by LuBashQ.

Contributing

I follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Everyone is welcome to contribute to this project.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func NewCore

func NewCore(enabler zapcore.LevelEnabler, encoder zapcore.Encoder, con *nats.Conn) *Core

func (*Core) Check

func (core *Core) Check(entry zapcore.Entry, checked *zapcore.CheckedEntry) *zapcore.CheckedEntry

func (*Core) Sync

func (core *Core) Sync() error

func (*Core) With

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

func (*Core) WithJetStream

func (core *Core) WithJetStream(stream string) (c *Core, err error)

func (*Core) WithSubject

func (core *Core) WithSubject(subject string) *Core

func (*Core) Write

func (core *Core) Write(entry zapcore.Entry, fields []zapcore.Field) error

Jump to

Keyboard shortcuts

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