logging

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

PulseHA - HA Cluster Daemon Copyright (C) 2017-2020 Andrew Zak <andrew@linux.com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcast

type Broadcast func(funcName client.ProtoFunction, data interface{})

type Logging

type Logging struct {
	Logger   *log.Logger
	Level    rpc.PulseLogs_Level
	Hostname string
	Broadcast
}

func NewLogger

func NewLogger(broadcast Broadcast) (Logging, error)

NewLogger Returns a new distributes logging object

func (*Logging) Debug

func (l *Logging) Debug(message string)

Debug Send a debug message to the cluster

func (*Logging) Error

func (l *Logging) Error(message string)

Info Send an error message to the cluster

func (*Logging) Info

func (l *Logging) Info(message string)

Info Send an info message to the cluster

func (*Logging) Warn

func (l *Logging) Warn(message string)

Warning Send a warning message to the cluster

Jump to

Keyboard shortcuts

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