juju: github.com/juju/juju/worker/logger Index | Files

package logger

import "github.com/juju/juju/worker/logger"


Package Files

logger.go manifold.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs a logger worker, using the resource names defined in the supplied config.

func NewLogger Uses

func NewLogger(config WorkerConfig) (worker.Worker, error)

NewLogger returns a worker.Worker that uses the notify watcher returned from the setup.

type Logger Uses

type Logger interface {
    Debugf(string, ...interface{})
    Infof(string, ...interface{})
    Warningf(string, ...interface{})
    Errorf(string, ...interface{})

Logger represents a loggo logger for the purpose of recording what is going on.

type LoggerAPI Uses

type LoggerAPI interface {
    LoggingConfig(agentTag names.Tag) (string, error)
    WatchLoggingConfig(agentTag names.Tag) (watcher.NotifyWatcher, error)

LoggerAPI represents the API calls the logger makes.

type ManifoldConfig Uses

type ManifoldConfig struct {
    AgentName       string
    APICallerName   string
    LoggingContext  *loggo.Context
    Logger          Logger
    UpdateAgentFunc func(string) error

ManifoldConfig defines the names of the manifolds on which a Manifold will depend.

type WorkerConfig Uses

type WorkerConfig struct {
    Context  *loggo.Context
    API      LoggerAPI
    Tag      names.Tag
    Logger   Logger
    Override string

    Callback func(string) error

WorkerConfig contains the information required for the Logger worker to operate.

func (*WorkerConfig) Validate Uses

func (c *WorkerConfig) Validate() error

Validate ensures all the necessary fields have values.

Package logger imports 9 packages (graph) and is imported by 90 packages. Updated 2020-05-01. Refresh now. Tools for package owners.