mirror of
https://github.com/IBM/fp-go.git
synced 2025-06-23 00:27:49 +02:00
19 lines
510 B
Go
19 lines
510 B
Go
![]() |
package io
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
|
||
|
G "github.com/ibm/fp-go/io/generic"
|
||
|
)
|
||
|
|
||
|
// 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
|
||
|
func Logf[A any](loggers ...*log.Logger) func(string) func(A) IO[any] {
|
||
|
return G.Logf[IO[any], A](loggers...)
|
||
|
}
|