mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-24 17:35:01 +01:00
a6aa610165
(Go 1.19 expanded doc comment syntax)
26 lines
492 B
Go
26 lines
492 B
Go
package rpc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zrepl/zrepl/daemon/logging"
|
|
"github.com/zrepl/zrepl/logger"
|
|
)
|
|
|
|
type Logger = logger.Logger
|
|
|
|
// All fields must be non-nil
|
|
type Loggers struct {
|
|
General Logger
|
|
Control Logger
|
|
Data Logger
|
|
}
|
|
|
|
func GetLoggersOrPanic(ctx context.Context) Loggers {
|
|
return Loggers{
|
|
General: logging.GetLogger(ctx, logging.SubsysRPC),
|
|
Control: logging.GetLogger(ctx, logging.SubsysRPCControl),
|
|
Data: logging.GetLogger(ctx, logging.SubsysRPCData),
|
|
}
|
|
}
|