2023-07-14 17:30:58 +02:00
|
|
|
package io
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
2023-07-18 15:57:54 +02:00
|
|
|
G "github.com/IBM/fp-go/io/generic"
|
2023-07-14 17:30:58 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// Logger constructs a logger function that can be used with ChainXXXIOK
|
|
|
|
func Logger[A any](loggers ...*log.Logger) func(string) func(A) IO[any] {
|
|
|
|
return G.Logger[IO[any], A](loggers...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Logf constructs a logger function that can be used with ChainXXXIOK
|
|
|
|
// the string prefix contains the format string for the log value
|
2023-07-15 23:27:45 +02:00
|
|
|
func Logf[A any](prefix string) func(A) IO[any] {
|
|
|
|
return G.Logf[IO[any], A](prefix)
|
2023-07-14 17:30:58 +02:00
|
|
|
}
|