2022-09-05 03:06:08 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-01-19 09:57:50 -05:00
|
|
|
// Package logging provides an interface for logging information to a non-confidential destination
|
2022-06-03 05:55:18 -04:00
|
|
|
package logging
|
|
|
|
|
|
|
|
import "io"
|
|
|
|
|
|
|
|
// CloudLogger is used to log information to a **non-confidential** destination
|
|
|
|
// at cloud provider for early-boot debugging. Make sure to **NOT** include any
|
|
|
|
// sensitive information!
|
|
|
|
type CloudLogger interface {
|
|
|
|
// Disclose is used to log information into a **non-confidential** destination at
|
|
|
|
// cloud provider for early-boot debugging. Make sure to **NOT** Disclose any
|
|
|
|
// sensitive information!
|
|
|
|
Disclose(msg string)
|
|
|
|
io.Closer
|
|
|
|
}
|
|
|
|
|
2022-11-09 09:57:54 -05:00
|
|
|
// NopLogger implements CloudLogger interface, but does nothing.
|
2022-06-03 05:55:18 -04:00
|
|
|
type NopLogger struct{}
|
|
|
|
|
2022-11-09 09:57:54 -05:00
|
|
|
// Disclose does nothing.
|
2022-06-03 05:55:18 -04:00
|
|
|
func (l *NopLogger) Disclose(msg string) {}
|
|
|
|
|
2022-11-09 09:57:54 -05:00
|
|
|
// Close does nothing.
|
2022-06-03 05:55:18 -04:00
|
|
|
func (l *NopLogger) Close() error {
|
|
|
|
return nil
|
|
|
|
}
|