File: log.go

package info (click to toggle)
golang-github-rabbitmq-amqp091-go 1.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 712 kB
  • sloc: xml: 500; sh: 129; makefile: 46
file content (23 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2022 VMware, Inc. or its affiliates. All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package amqp091

type Logging interface {
	Printf(format string, v ...interface{})
}

var Logger Logging = NullLogger{}

// Enables logging using a custom Logging instance. Note that this is
// not thread safe and should be called at application start
func SetLogger(logger Logging) {
	Logger = logger
}

type NullLogger struct {
}

func (l NullLogger) Printf(format string, v ...interface{}) {
}