Re: [go-nuts] rpc.debugLog unexported

2019-12-09 Thread Atakan Çolak
Hi,

I had tried a similar approach for customizing golokia 
. 

Why do we need to move the imported packages code to the project directory? 
Doesn't go compile using the local copy of the imported package in GOPATH? 

What am I missing here?

8 Aralık 2019 Pazar 21:07:55 UTC+3 tarihinde dickmao yazdı:
>
> Thanks for your reply.  Do you regularly edit standard libs as described 
> (and 
> then presumably edit them back)? 
>
> I copied /usr/lib/go-1.13/net/rpc to my project directory, then changed 
> all 
> imports of "net/rpc" to "./net/rpc", and then set debugLog (in my shadow 
> copy, 
> not /usr/lib/go-1.13).  It got the job done but still felt wrong. 
>
> > Ian Lance Taylor > writes: 
>
> > On Sat, Dec 7, 2019 at 9:12 AM > 
> wrote: 
> >> 
> >> How can I turn on debugging in net/rpc/server.go? 
> >> 
> >> There is a promising variable called `debugLog` in there.  How should I 
> toggle it? 
>
> > I don't know how much it will help, but the way to toggle it is to 
> literally 
> > edit net/rpc/debug.go to set debugLog to true.  There's no mechanism for 
> > setting it dynamically. 
>
> > Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/6aebd06b-aab4-4c9a-be88-ae2d72822362%40googlegroups.com.


Re: [go-nuts] rpc.debugLog unexported

2019-12-08 Thread Ian Lance Taylor
On Sun, Dec 8, 2019 at 10:07 AM  wrote:
>
> Thanks for your reply.  Do you regularly edit standard libs as described (and
> then presumably edit them back)?

While debugging the standard library, yes, I do.  But I also agree
that for this case it might be useful to have a more usable mechanism.

> I copied /usr/lib/go-1.13/net/rpc to my project directory, then changed all
> imports of "net/rpc" to "./net/rpc", and then set debugLog (in my shadow copy,
> not /usr/lib/go-1.13).  It got the job done but still felt wrong.

If that helped solve the problem then I would encourage you to file an
issue asking for a mechanism to set debugLog in a simpler way, perhaps
via the `GODEBUG` environment variable or perhaps via a function in
the net/rpc package.

Ian


> > Ian Lance Taylor  writes:
>
> > On Sat, Dec 7, 2019 at 9:12 AM  wrote:
> >>
> >> How can I turn on debugging in net/rpc/server.go?
> >>
> >> There is a promising variable called `debugLog` in there.  How should I 
> >> toggle it?
>
> > I don't know how much it will help, but the way to toggle it is to literally
> > edit net/rpc/debug.go to set debugLog to true.  There's no mechanism for
> > setting it dynamically.
>
> > Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXNOwuW4zyo3gbit7KFcgpVmLkNayOKS3Xp71EBt9VqrA%40mail.gmail.com.


Re: [go-nuts] rpc.debugLog unexported

2019-12-08 Thread dick . r . chiang
Thanks for your reply.  Do you regularly edit standard libs as described (and
then presumably edit them back)?

I copied /usr/lib/go-1.13/net/rpc to my project directory, then changed all
imports of "net/rpc" to "./net/rpc", and then set debugLog (in my shadow copy,
not /usr/lib/go-1.13).  It got the job done but still felt wrong.

> Ian Lance Taylor  writes:

> On Sat, Dec 7, 2019 at 9:12 AM  wrote:
>> 
>> How can I turn on debugging in net/rpc/server.go?
>> 
>> There is a promising variable called `debugLog` in there.  How should I 
>> toggle it?

> I don't know how much it will help, but the way to toggle it is to literally
> edit net/rpc/debug.go to set debugLog to true.  There's no mechanism for
> setting it dynamically.

> Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/87muc2g07z.fsf%40dick.


Re: [go-nuts] rpc.debugLog unexported

2019-12-07 Thread Ian Lance Taylor
On Sat, Dec 7, 2019 at 9:12 AM  wrote:
>
> How can I turn on debugging in net/rpc/server.go?
>
> There is a promising variable called `debugLog` in there.  How should I 
> toggle it?

I don't know how much it will help, but the way to toggle it is to
literally edit net/rpc/debug.go to set debugLog to true.  There's no
mechanism for setting it dynamically.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUry9HYTy6KiGFFTMJqmmCC%3DSTNhFcNsarjoUK1xFqW%3Dg%40mail.gmail.com.


[go-nuts] rpc.debugLog unexported

2019-12-07 Thread dick . r . chiang
How can I turn on debugging in net/rpc/server.go?

There is a promising variable called `debugLog` in there.  How should I toggle 
it?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/87a7849nb8.fsf%40dick.