remotelog

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0, BSD-2-Clause Imports: 20 Imported by: 4

Documentation

Overview

Package remotelog is a plugin that enables log messages being sent via UDP to a central ELK stack for debugging. It is disabled by default and when enabled, additionally, logger.disableEvents=false in config.json needs to be set. The destination can be set via logger.remotelog.serverAddress. All events according to logger.level in config.json are sent.

Index

Constants

View Source
const (
	// PluginName is the name of the remote log plugin.
	PluginName = "RemoteLog"
)

Variables

View Source
var Parameters = &ParametersDefinition{}

Parameters contains the configuration used by the remotelog plugin.

Functions

func Plugin added in v0.2.0

func Plugin() *node.Plugin

Plugin gets the plugin instance.

func SendLogMsg added in v0.5.7

func SendLogMsg(level logger.Level, name, msg string)

SendLogMsg sends log message to the remote logger.

Types

type ParametersDefinition added in v0.7.4

type ParametersDefinition struct {
	// RemoteLog defines the parameters to reach the remote logging server.
	RemoteLog struct {
		// ServerAddress defines the server address that will receive the logs.
		ServerAddress string `default:"ressims.iota.cafe:5213" usage:"RemoteLog server address"`
	} `name:"remotelog"`
}

ParametersDefinition contains the definition of the parameters used by the remotelog plugin.

type RemoteLoggerConn added in v0.2.0

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

RemoteLoggerConn is a wrapper for a connection to our RemoteLog server.

func RemoteLogger added in v0.2.0

func RemoteLogger() *RemoteLoggerConn

RemoteLogger represents a connection to our remote log server.

func (*RemoteLoggerConn) Send added in v0.2.0

func (r *RemoteLoggerConn) Send(msg interface{}) error

Send sends a message on the RemoteLoggers connection.

Jump to

Keyboard shortcuts

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