apexlogs

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package apexlogs implements a handler for Apex Logs https://apex.sh/logs/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler implementation.

func New added in v1.5.0

func New(url, projectID, authToken string, options ...Option) *Handler

New Apex Logs handler with the url, projectID, authToken and options.

func (*Handler) Close added in v1.5.0

func (h *Handler) Close()

Close flushes any pending logs, and waits for flushing to complete. This method should be called before exiting your program to ensure entries have flushed properly.

func (*Handler) Flush

func (h *Handler) Flush()

Flush any pending logs. This method is non-blocking.

func (*Handler) FlushSync added in v1.7.0

func (h *Handler) FlushSync()

FlushSync any pending logs. This method is blocking.

func (*Handler) HandleLog

func (h *Handler) HandleLog(e *log.Entry) error

HandleLog implements log.Handler.

type Option added in v1.5.0

type Option func(*Handler)

Option function.

func WithBufferOptions added in v1.5.0

func WithBufferOptions(options ...buffer.Option) Option

WithBufferOptions sets options for the underlying buffer used to batch logs.

func WithHTTPClient added in v1.5.0

func WithHTTPClient(client *http.Client) Option

WithHTTPClient sets the HTTP client used for requests.

Jump to

Keyboard shortcuts

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