Re: [go-nuts] Dynamic composition of interfaces at runtime?

2020-08-26 Thread cpu...@gmail.com
s of the wrapped type are and do, you might > introduce very hard to find bugs. > > On Wed, Aug 26, 2020 at 5:49 PM cpu...@gmail.com wrote: > >> Hi All, >> >> using interfaces for behavioural testing seems a common pattern in go: >> >> if typed, has

[go-nuts] What are the best practices for go build tools?

2020-09-13 Thread cpu...@gmail.com
Hello experts, I'm currently using //go:generate with external and module-internal tools. All external tools are documented in tools.go: // +build tools package main import ( _ "github.com/golang/mock/mockgen" _ "github.com/mjibson/esc" ) However, the existing setup has a couple of drawbacks:

Re: [go-nuts] What are the best practices for go build tools?

2020-09-19 Thread cpu...@gmail.com
Hi Paul! Thank you for taking the time to reply. On Friday, September 18, 2020 at 11:33:49 AM UTC+2 Paul Jolly wrote: > Hi Andi, > > > 1) I cannot do go install tools.go: > > go install takes main packages as arguments, so no, this will not > work. The tools.go file (like the example you pres

[go-nuts] CSS-like selectors for Go AST?

2020-10-13 Thread cpu...@gmail.com
Good morning. I've recently found myself writing a code generator for dynamic interface composition at runtime. It became ugly and I had to pass in quite a number of parameters that should have been available from reading the source code. In a second attempt I've reimplemented the generator usi

[go-nuts] Re: CSS-like selectors for Go AST?

2020-10-14 Thread cpu...@gmail.com
3]") > y := ast2.AnyToAst(x, nil) // wrap the existing AST. does not allocate > memory. > > ythree := y.Get(1).Get(1).Get(1) // extract the "3" as ast2.Node > > // now unwrap it, getting the *ast.BasicLit and the Value inside it > var three s

[go-nuts] Why do type aliases change behaviour (i.e. json.Unmarshal)?

2021-03-15 Thread cpu...@gmail.com
I've just tried doing something like this in my code: // Token is an OAuth2 token which includes decoding the expires_in attribute type Token struct { oauth2.Token ExpiresIn int `json:"expires_in"` // expiration time in seconds } func (t *Token) UnmarshalJSON(data []byte) error { ... } type Wrap

Re: [go-nuts] Why do type aliases change behaviour (i.e. json.Unmarshal)?

2021-03-15 Thread cpu...@gmail.com
Token (since > both identifier denote the same type). > > But maybe that is not what you are looking for, if that's the case, there > are other ways around the problem, like type embedding and such. > Hope this helps, > > Le lun. 15 mars 2021 à 13:49, cpu...@gmail.com a

[go-nuts] Fixing deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts

2021-03-19 Thread cpu...@gmail.com
Hi all, I've recently learned about oauth2 and started to convert some of my "manual" code using net/http to use an underlying oauth2.Transport for executing authenticated requests and token refresh. As a result, my application now sometimes shows deprecated: golang.org/x/oauth2: Transpo

Re: [go-nuts] No generic, part -2

2021-03-19 Thread cpu...@gmail.com
On Thursday, March 18, 2021 at 1:53:30 PM UTC+1 ren...@ix.netcom.com wrote: > One other point on this. Generics will be trivial for 95% of the people - > they will only need to be able to read and write the instantiation > statements of type safe collections. > > Most developers don’t write the

[go-nuts] Re: Fixing deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts

2021-03-22 Thread cpu...@gmail.com
Opened https://github.com/golang/oauth2/issues/487 to propose removing the `CancelRequest` method. Cheers, Andreas On Friday, March 19, 2021 at 5:44:21 PM UTC+1 cpu...@gmail.com wrote: > Hi all, > > I've recently learned about oauth2 and started to convert some of my > "

[go-nuts] How to wait for HTTP server to start?

2021-03-27 Thread cpu...@gmail.com
The typical Go tutorials pattern for starting a server is something like log.Fatal(http.ListenAndServe(":8080")) But what if the application needs to do other things after the server is started? It seems there is virtually no method to wait for the server actually start listening to reques

Re: [go-nuts] How to wait for HTTP server to start?

2021-03-30 Thread cpu...@gmail.com
rr := net.Listen("tcp", ":"+port) if err != nil { log.Fatal(err) } var wg sync.WaitGroup wg.Add(1) go func() { server := &http.Server{Addr: ":" + port, Handler: handler} wg.Done() log.Fatal(server.Serve(ln)) }() wg.Wait() Cheers, Andi > > On Sat, 27 Mar

[go-nuts] Can I import a package from a git submodule?

2021-03-31 Thread cpu...@gmail.com
Consider this layout: - Repo A contains module foo - Repo B contains module bar (of course ;) - Repo B is added as submodule to repo A at /baz I was expecting that I can import "foo/baz/bar" in repo A, but that leads to error ("no required module provides package..."). Shouldn't t

[go-nuts] Autocert failure with HTTP handler

2021-04-19 Thread cpu...@gmail.com
Hello, I have a very stupid problem with autocert. The below code works: log.Println("sslHosts:", sslHosts) log.Println("sslCertDir:", sslCertDir) certManager := autocert.Manager{ Prompt: autocert.AcceptTOS, HostPolicy: autocert.HostWhitelist(strings.Split(sslHosts, " ")...), Cache: autocert.Di

[go-nuts] Re: Autocert failure with HTTP handler

2021-04-19 Thread cpu...@gmail.com
That makes perfect sense as the simple reproducer shows: https://play.golang.org/p/vSEBtdV2CzR Only in this case I didn't see it as there were more go routines alive. Much appreciated, thank you! On Monday, April 19, 2021 at 11:29:31 PM UTC+2 Brian Candler wrote: > As far as I understand it: "

[go-nuts] Suggestion to extend x/OAuth2 API

2021-04-22 Thread cpu...@gmail.com
After working with a few more-or-less OAuth2 APIs lately, I would like to propose slightly extending the API footprint of the oauth2 library. By doing so I expect that the amount of userland/provider-specific code can be reduced- both inside oauth2 and outside in realworld applications. Some o

[go-nuts] Re: Suggestion to extend x/OAuth2 API

2021-05-09 Thread cpu...@gmail.com
There is some support for a configurable token source in https://github.com/golang/oauth2/pull/448#issuecomment-835811792, no feedback otherwise. Cheers, Andi On Thursday, April 22, 2021 at 6:10:38 PM UTC+2 cpu...@gmail.com wrote: > After working with a few more-or-less OAuth2 APIs lately

[go-nuts] How can I check error types of gRPC calls?

2021-05-15 Thread cpu...@gmail.com
In my local code, I'm using things like if errors.Is(err, api.ErrMustRetry) { ... } How would I achieve the same on errors returned by the gRCP interface? I've noticed these are wrapped: rpc error: code = Unknown desc = must retry rpc error: code = Unknown desc = must retry I assume the erro

Re: [go-nuts] How can I check error types of gRPC calls?

2021-05-18 Thread cpu...@gmail.com
chak wrote: > On Sat, 2021-05-15 at 04:47 -0700, cpu...@gmail.com wrote: > > In my local code, I'm using things like > > > > if errors.Is(err, api.ErrMustRetry) { ... } > > > > How would I achieve the same on errors returned by the gRCP > > interface? I

[go-nuts] A little love for x/oauth2

2021-05-19 Thread cpu...@gmail.com
I've recently worked a bit with oauth2 and noticed that issue tracker and PRs could use a little love. Quite a number of PRs have gone through Gerrit review without merging and the issues contain some imho valid points. Is there a policy for maintaining x/oauth2 or putting it into slower mainte

[go-nuts] How to use errors.As with sentinel errors?

2021-08-02 Thread cpu...@gmail.com
Consider this example: https://play.golang.org/p/16cU0kc8Lku, basically var Err = errors.New("sentinel") err := errors.New("foo") if errors.As(err, &Err) { fmt.Println("why?") } I'm wondering why this matches the sentinel error, or rather how to properly use sentinel errors. errors.As says "An

[go-nuts] Re: How to use errors.As with sentinel errors?

2021-08-02 Thread cpu...@gmail.com
errors in a chain. So I should just use errors.Is here... Sorry for the confusion! On Monday, August 2, 2021 at 10:02:11 AM UTC+2 cpu...@gmail.com wrote: > Consider this example: https://play.golang.org/p/16cU0kc8Lku, basically > > var Err = errors.New("sentinel") > err :=

[go-nuts] How to diagnose a stuck program

2021-11-06 Thread cpu...@gmail.com
Developing https://github.com/evcc-io/evcc I've recently had a bug report of unresponsive application. Logfile shows, that the program still has alive go routines but the main loop doesn't show up in the logs any more, to it seems stuck. This may be more a Unix than a Go question: can I connect

[go-nuts] gob: decoding into local type []float64, received remote type []float

2021-11-28 Thread cpu...@gmail.com
I'm trying to transfer arbitrary structs over gRPC. To achieve this I've trying to use gob for encoding the interface{} part of the structs. The code looks somewhat like https://go.dev/play/p/4Q5CQE4Wcy2 but not entirely. Two things strike me strange: - I receive "gob: decoding into local type [

[go-nuts] Re: gob: decoding into local type []float64, received remote type []float

2021-11-29 Thread cpu...@gmail.com
. I couldn't find anything regarding enc that should prevent reusing it? Cheers, Andi On Sunday, November 28, 2021 at 9:10:37 PM UTC+1 cpu...@gmail.com wrote: > I'm trying to transfer arbitrary structs over gRPC. To achieve this I've > trying to use gob for encoding the in

[go-nuts] What are best practices for synchronizing data access in web applications?

2022-03-01 Thread cpu...@gmail.com
I've developed a semi-complex server application (https://evcc.io) with web ui. Since web requests are async per nature and I wan't to service them quickly, mutexes are used. I'm now at the point where I realise that sprinkling (un)locks over the code quickly leads to deadlocks and unforeseeabl

[go-nuts] x/exp/slices: add Map/Extract function

2022-03-20 Thread cpu...@gmail.com
Playing with 1.18 I've noticed that I can immediately replace pretty much all uses of https://github.com/thoas/go-funk with the new slices package. One common use case that I happen to have in the codebase quite a lot is extracting data from a slice of objects: funk.Map(chargers, func(c easee.

Re: [go-nuts] encoding/asn1 overly strict?

2022-06-08 Thread cpu...@gmail.com
Sorry to revive this ancient discussion. We've come across https://forum.golangbridge.org/t/x509-certificate-parse-error-with-iot-device/27622/2 where an IOT device from a large vendor uses BER for it's TLS certificate. It's unlikely, that the vendor will fix the certificate any time soon.

Re: [go-nuts] encoding/asn1 overly strict?

2022-06-09 Thread cpu...@gmail.com
On Wednesday, June 8, 2022 at 5:53:50 PM UTC+2 Brian Candler wrote: > On Wednesday, 8 June 2022 at 10:09:26 UTC+1 andig wrote: > >> We've not found an approach for communicating with the device sofar >> unless using patched Go stdlib. >> > > Connect via a proxy like stunnel? > > Out of interest,

[go-nuts] Error-checking with errors.As() is brittle with regards to plain vs pointer types

2022-09-21 Thread cpu...@gmail.com
Consider https://go.dev/play/p/jgPMwLRRsqe: errors.As(err, ) will not match if error is of pointer type. As a result, a library consumer needs to understand if a library returns Error or *Error. However, that is not part of the API spec as both returns would satisfy error if Error() is implemen

[go-nuts] Patching Go sources - which files end up in the build?

2022-10-02 Thread cpu...@gmail.com
For various reasons we need to patch cryptobytes for our build (https://github.com/evcc-io/eebus/issues/1#issuecomment-1146843187). We've tried to do this in a consistent way for local, Docker and Github CI build by vendoring our modules (go mod vendor) and patching the vendored copy. Test con

[go-nuts] 1.19.2: gofmt fails on CI but not locally

2022-10-27 Thread cpu...@gmail.com
Really strange issue, have been scratching my head for hours now. Consider https://github.com/evcc-io/evcc/blob/0b8105d36d245a2169961c48e50fbb830fd38147/charger/ocpp_decorators.go. Absolutely fine imho. Yet gofmt fails, but only on CI: https://github.com/evcc-io/evcc/actions/runs/3340736849/jo

[go-nuts] Drain channel on demand without busy looping?

2023-02-05 Thread cpu...@gmail.com
I have the requirement of being able to drain a channel, i.e. make sure that downstream processes all data currently being sent. One possible pattern is something like for{ select{ case <-q.data: default: } } where the default branch could indicate that channel has been drained. My concern is,

[go-nuts] Using struct{} for context keys

2023-05-28 Thread cpu...@gmail.com
I've recently stumbled across code like this https://go.dev/play/p/u3UER2ywRlr: type clientContextKey struct{} ctx := context.Background() ctx = context.WithValue(ctx, clientContextKey{}, "foo") _, ok := ctx.Value(clientContextKey{}).(string) Naively, I had expected this to fail since I assumed

[go-nuts] Using log/slog with log.Logger format?

2023-07-20 Thread cpu...@gmail.com
The log/slog logger uses the log.Logger format by default. Implementation is internal. In a gradual switch to slog I'd like to keep that format for time being but customize other handler options- hence need to create a new Logger. Is there a good way to do that without reimplementing the entire

[go-nuts] Re: Using log/slog with log.Logger format?

2023-07-22 Thread cpu...@gmail.com
Seems it's not possible to create a logger using the log.Logger format in a straight-forward way? On Thursday, July 20, 2023 at 3:48:49 PM UTC+2 cpu...@gmail.com wrote: > The log/slog logger uses the log.Logger format by default. Implementation > is internal. > > In a gradu

[go-nuts] Go 1.22 binary size improvements?

2024-02-09 Thread cpu...@gmail.com
I was surprised to see my application (MacOS binary) go from 93MB to 81MB (no PGO). Release notes don't mention this. Has anyone made similar experience or knows why that is? Thanks, Andi -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsu

[go-nuts] Re: Go 1.22 binary size improvements?

2024-02-09 Thread cpu...@gmail.com
reduces binary size. > However, from 93MB to 81MB, I think it is most likely the result of the > joint efforts of many CLs. > > On Friday, February 9, 2024 at 7:46:48 PM UTC+8 cpu...@gmail.com wrote: > >> I was surprised to see my application (MacOS binary) go from 93MB

[go-nuts] Re: Go 1.22 binary size improvements?

2024-02-09 Thread cpu...@gmail.com
Just gave it another try cross-compiling to Arm on Linux. This time binary size stays the same. Sorry if my excitement was too premature. On Friday, February 9, 2024 at 2:11:25 PM UTC+1 cpu...@gmail.com wrote: > It's really surprising (positively). Compiling with -ldflags='-s -w&

[go-nuts] Re: Go 1.22 binary size improvements?

2024-02-09 Thread cpu...@gmail.com
Yes, CGO is disabled. ldd doesn't seem to exist on MacOS: make build && ls -la ./evcc && otool -L ./evcc 1.21.7 CGO_ENABLED=0 go build -v -tags=release -trimpath -ldflags='-X github.com/evcc-io/evcc/server.Version=0.124.1 -X github.com/evcc-io/evcc/server.Commit=596071b42 -s -w' -rwxr-xr-x 1

[go-nuts] How to add labels to Go runtime prometheus metrics?

2024-03-06 Thread cpu...@gmail.com
The Go runtime exposes various metrics. To collect metrics from multiple servers I'd like to add labels for server name. Is it possible to extend the build-in metrics for this purpose? Thanks, Andi -- You received this message because you are subscribed to the Google Groups "golang-nuts" grou

[go-nuts] Re: How to add labels to Go runtime prometheus metrics?

2024-03-06 Thread cpu...@gmail.com
de a label for the hostname (e.g. > node_exporter, windows_exporter etc). > > If there's something special about your situation which means you need to > do this, can you explain your use case further? > > On Wednesday 6 March 2024 at 10:40:29 UTC cpu...@gmail.com wrote: >

[go-nuts] Where is my type?

2024-04-24 Thread cpu...@gmail.com
Every time I feel I've come to terms with how Go works I round a corner and hit a wall, even after doing this for >5 years. Here's one. Consider this simple code (https://go.dev/play/p/bph5I80vc99): package main import ( "encoding/json" "fmt" ) type S struct { Foo int } func update(v any) { i

[go-nuts] Re: Where is my type?

2024-04-24 Thread cpu...@gmail.com
It's worth noting that before the Unmarshal v is {}(main.S) and afterwards {}(map[string]interface{}) On Wednesday, April 24, 2024 at 6:46:18 PM UTC+2 cpu...@gmail.com wrote: > Every time I feel I've come to terms with how Go works I round a corner > and hit a wall, even afte

Re: [go-nuts] Where is my type?

2024-04-24 Thread cpu...@gmail.com
ond case the > interface contains *S, which is writable, so unmarshal fills it in via > reflection. > > On Wed, Apr 24, 2024 at 10:46 AM cpu...@gmail.com > wrote: > > > > Every time I feel I've come to terms with how Go works I round a corner > and hit a wall,

Re: [go-nuts] Where is my type?

2024-04-24 Thread cpu...@gmail.com
Your answer has put me on the right track. Here's the long version: https://stackoverflow.com/questions/48790663/why-value-stored-in-an-interface-is-not-addressable-in-golang On Wednesday, April 24, 2024 at 6:55:53 PM UTC+2 cpu...@gmail.com wrote: > > In the first case, the interfa

[go-nuts] Programming patterns: storing runtime configuration

2024-08-14 Thread cpu...@gmail.com
Hope the question is not too OT for this group, if yes please just ignore it and forgive me. We're in the progress of migrating a somewhat-complex application (https://github.com/evcc-io/evcc) from static, yaml-based configuration to fully UI-controllable dynamic config. A running application m

[go-nuts] Working with release candidates

2024-12-19 Thread cpu...@gmail.com
I'm preparing our application for go1.24, including using the tools go.mod directive. I was expecting that I should be able to require rc1 as part of the build process. However, adding go 1.24rc1 toolchain 1.24rc1 lead to either unknown block type: tool invalid toolchain version '1.24rc1': mu

[go-nuts] Re: Working with release candidates

2024-12-20 Thread cpu...@gmail.com
d > to have an implicit toolchain go*V* line, where *V* is the Go version > from the go line. > > So you only need to use 'go 1.24rc1' line. > > On Thursday, December 19, 2024 at 4:30:40 AM UTC-8 cpu...@gmail.com wrote: > >> I'm preparing our application

Re: [go-nuts] Re: Working with release candidates

2024-12-21 Thread cpu...@gmail.com
rect > ) > ``` > > $ go version # go binary is 1.23 > go: downloading go1.24rc1 (linux/amd64) > go version go1.24rc1 linux/amd64 > > On Fri, Dec 20, 2024 at 5:11 PM cpu...@gmail.com wrote: > >> I already did- that's the first error message: >> >> go: e

[go-nuts] Using errors.As error-prone

2025-02-12 Thread cpu...@gmail.com
I've had some ongoing confusion about using errors.As (see https://play.golang.com/p/m4_cXCzOViD). The issue I'm having is this part of the contract: > An error matches target if the error's concrete value is assignable to the value pointed to by target I always expected (yes, I know), that ba

Re: [go-nuts] Using errors.As error-prone

2025-02-14 Thread cpu...@gmail.com
ave been bitten. Imho this needs much better tooling. On Wednesday, February 12, 2025 at 10:06:08 AM UTC+1 Axel Wagner wrote: > On Wed, 12 Feb 2025 at 09:21, cpu...@gmail.com wrote: > >> I've had some ongoing confusion about using errors.As (see >> https://play.golang.co

[go-nuts] Why does using time.Time.Compare like this work?

2025-02-20 Thread cpu...@gmail.com
Sorry for not finding a better than this click bait subject. In https://github.com/golang/go/issues/62642 this suggestion was made: slices.SortFunc(times, time.Time.Compare) It's totally unclear to me how Time.Compare matches the compare func(a,b T) int signature? I assume it's something from

[go-nuts] Re: Why does using time.Time.Compare like this work?

2025-02-20 Thread cpu...@gmail.com
me.Now() > b := a.Add(1 * time.Hour) > cmp := time.Time.Compare > cmp(a) // error: not enough arguments in call to cmp > cmp(a, b) // ok > > https://go.dev/play/p/x3ZGIhQ2TNE > > > Diogo Lisboa > > On Thursday, February 20, 2025 at 2:57:35 PM UTC-3 cpu...@gmail.com wrote:

[go-nuts] Why can't single-method interfaces not be implemented by embedding?

2025-02-27 Thread cpu...@gmail.com
About every single time I feel like I understand Go interfaces I'm being taught differently. Consider this play: https://play.golang.com/p/qeF4KvaPcwp There are 2 single method interfaces. One where interface and method names are equal, one where they are different. I would have expected m to

Re: [go-nuts] Why can't single-method interfaces not be implemented by embedding?

2025-02-27 Thread cpu...@gmail.com
27;t (due to name conflict with the embedded equal name interface) where would still be the embedded equal name interface (which might be nil but still existing)? Thanks, Andi On Thursday, February 27, 2025 at 6:40:30 PM UTC+1 Ian Lance Taylor wrote: > On Thu, Feb 27, 2025 at 9:32 AM cpu.

Re: [go-nuts] Why does this channel-based pub/sub broker panic?

2025-03-04 Thread cpu...@gmail.com
2:51:41 PM UTC+1 Jan Mercl wrote: > On Tue, Mar 4, 2025 at 2:41 PM cpu...@gmail.com wrote: > > > I've recently run across > https://stackoverflow.com/questions/36417199/how-to-broadcast-message-using-channel > > by icza and tried to use the simple broker in my pro

Re: [go-nuts] Why does this channel-based pub/sub broker panic?

2025-03-04 Thread cpu...@gmail.com
; I figured it out. Because the subscribe channel is buffered. Technically > the broker can see the unsubscribe for the client before the subscribe > message. So it closes the channel then tries to send on it. > > On Mar 4, 2025, at 8:23 AM, cpu...@gmail.com wrote: > > Thanks Robert

[go-nuts] Why does this channel-based pub/sub broker panic?

2025-03-04 Thread cpu...@gmail.com
I've recently run across https://stackoverflow.com/questions/36417199/how-to-broadcast-message-using-channel by icza and tried to use the simple broker in my project. Unfortunately, it panics with send on closed channel. I couldn't figure out why or where and created a reproducer: https://pl

Re: [go-nuts] Why does this channel-based pub/sub broker panic?

2025-03-04 Thread cpu...@gmail.com
hat isn’t read when the channel is closed. When I make them > all unbuffered it works. > > On Mar 4, 2025, at 8:04 AM, cpu...@gmail.com wrote: > > Thanks Robert, > > > did a quick try and still panics. This seems to make sense- the > unsubscribe is the root cause

Re: [go-nuts] Why does this channel-based pub/sub broker panic?

2025-03-04 Thread cpu...@gmail.com
an’t make the unsubscribe channel buffered. > > On Mar 4, 2025, at 7:55 AM, cpu...@gmail.com wrote: > > Thanks Jan, but this just confirms that there is a send on a closed > channel. > > > It makes me wonder though (far, very far shot): given the map of > subscriptions is usi

Re: [go-nuts] Why can't single-method interfaces not be implemented by embedding?

2025-02-27 Thread cpu...@gmail.com
27;t the shadow implement the interface? On Thursday, February 27, 2025 at 6:28:16 PM UTC+1 burak serdar wrote: > The embedded name `EqualName` shahows the method called `EqualName`. > > Rename the `EqualName` interface to `EqualNamer`, and things work. > > > On Thu, Feb 27,

Re: [go-nuts] Why can't single-method interfaces not be implemented by embedding?

2025-02-28 Thread cpu...@gmail.com
Thank you Axel for quoting the spec. On Thursday, February 27, 2025 at 10:55:58 PM UTC+1 Axel Wagner wrote: > For a value x of type T or *T where T is not a pointer or interface type, x.f denotes the field or method *at the shallowest depth* in T where there is such an f. If there is not exactl

Re: [go-nuts] LLM development toolkit.

2025-02-28 Thread cpu...@gmail.com
Zip files are impossible to reason about on Github and a potential security thread. I'd not even try to find out what might be inside... On Tuesday, February 18, 2025 at 1:40:43 PM UTC+1 alex-coder wrote: > Hi All, > > I was given a shelter there: > gussev/llm: >

[go-nuts] Logging best practices with log/slog

2025-03-28 Thread cpu...@gmail.com
I'm in the process of converting our application (evcc.io) from using spf13/jwalterweatherman for logging to log/slog. One current pain point is passing loggers around the application and deriving child loggers. With using slog there are various options for doing that: Passing loggers: - pa