--- Log opened Sat May 09 00:00:15 2020 00:03 -!- zmnscpxj_ [~zmnscpxj@gateway/tor-sasl/zmnscpxj] has joined #c-lightning 00:20 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 00:32 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 00:32 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 00:38 -!- justan0theruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 252 seconds] 01:10 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 02:00 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 02:00 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 02:08 -!- justan0theruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 02:46 -!- justan0theruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 240 seconds] 03:17 -!- justan0theruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 04:12 -!- liberliver [~Thunderbi@144.49.211.130.bc.googleusercontent.com] has quit [Ping timeout: 272 seconds] 04:18 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 04:19 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 06:37 -!- fiatjaf [~fiatjaf@2804:7f2:2a84:199d:ea40:f2ff:fe85:d2dc] has quit [Ping timeout: 256 seconds] 06:45 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Quit: jonatack] 06:57 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #c-lightning 07:08 -!- Victor_sueca is now known as Victorsueca 07:39 -!- liberliver [~Thunderbi@144.49.211.130.bc.googleusercontent.com] has joined #c-lightning 08:20 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 08:20 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 08:23 -!- fiatjaf [~fiatjaf@2804:7f2:2a81:6c39:ea40:f2ff:fe85:d2dc] has joined #c-lightning 08:43 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 08:44 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 09:03 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 09:03 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 09:20 -!- vasild_ [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 09:22 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 09:22 -!- vasild_ is now known as vasild 09:48 -!- vincenzopalazzo [~vincent@153.33.4.31] has joined #c-lightning 10:16 -!- justan0theruser is now known as justanotheruser 10:39 -!- theStack [~honeybadg@vps1648322.vs.webtropia-customer.com] has joined #c-lightning 11:06 < theStack> can anyone tell me on how to output a log message in a common module that is used by both lightnind and one of its subdaemons? 11:07 < theStack> e.g. in common/wireaddr.c status_info() leads to a linking error, whereas log_info() needs a logbook handle which i don't have 11:07 < theStack> i miss the simple LogPrintf like in bitcoin core 11:07 < zmnscpxj_> is the subdaemon async or sync? 11:07 < theStack> (i know i know, different architecture :)) 11:07 < zmnscpxj_> which subdaemon are you modifying? 11:08 < theStack> zmnscpxj_: not a particular one, i just want to debug what's going on inside of a common/wireaddr.c function 11:09 < zmnscpxj_> worst case you could just #include and fprintf(stderr, ) or printf 11:09 < zmnscpxj_> if you are doing debugging 11:09 < theStack> zmnscpxj_: yes i thought about that as plan B 11:11 < zmnscpxj_> you are supposed to use status_info I think, but which subdaemon are you using? 11:11 < zmnscpxj_> because it should work for channeld/openingd/closingd 11:12 < zmnscpxj_> or are you in hsmd / connectd / gossipd? 11:13 <@cdecker> Good point, we might want to have at least similar function signatures for the main daemon vs. subdaemons, and the linking then decides which implementation to use 11:14 < zmnscpxj_> I think that requires us to pass in a log handler everywhere then. Not so bad but annoying to factor in... bleah 11:15 < theStack> the module i'm modifying is used both by lightningd and various subdaemons (gossipd, connectd); hence in this module logging is basically not possible, if i didn't miss something 11:15 < zmnscpxj_> and you have multiple implementation of the same function... which is already bad since we have multiple implementations of the same struct name 11:15 < zmnscpxj_> leading to much confusion 11:15 < zmnscpxj_> should just use the vtable pattern...... 11:16 < zmnscpxj_> connectd/gossipd should be using something similar to log_* I think.... 11:16 < zmnscpxj_> like in the lightningd itself 11:22 < theStack> seems like only the master daemon is using log_* functions right now (also fits the description in HACKING.md) 11:22 < zmnscpxj_> hah, okay. 11:24 < theStack> it's a bit weird because some modules in common/ use status_* functions; right now all of those couldn't be used in the master daemon 11:24 < theStack> don't know if that's a big problem though 11:24 < zmnscpxj_> yes 11:24 < zmnscpxj_> the master daemon should be doing very little, it should be a glorified RPC bus for the different subdaemons 11:25 < theStack> hmm that sounds reasonable 11:25 < zmnscpxj_> though if you are up to it, we can define a shared struct log* type that uses the vtable pattern. 11:25 < zmnscpxj_> basically it is just a struct with a void *data; and a bunch of function pointers 11:25 < zmnscpxj_> and the log_info etc. functions just redirect to the function pointers. 11:26 < zmnscpxj_> Then we can create an adaptor construcing struct log * and then wrapping those to calls to status_* functions 11:27 < zmnscpxj_> but that is a complex refactoring, increases codesize, and the current way is not so extremely bad....... so far 11:27 < zmnscpxj_> ^^ 11:34 < theStack> i also don't think it's too bad how it is as long as one knows about it; for my use case of just debugging other solutions can be found 11:57 -!- vincenzopalazzo [~vincent@153.33.4.31] has quit [Ping timeout: 246 seconds] 11:58 -!- liberliver [~Thunderbi@144.49.211.130.bc.googleusercontent.com] has quit [Ping timeout: 256 seconds] 12:19 -!- liberliver [~Thunderbi@144.49.211.130.bc.googleusercontent.com] has joined #c-lightning 13:11 -!- theStack [~honeybadg@vps1648322.vs.webtropia-customer.com] has left #c-lightning [] 13:25 -!- liberliver [~Thunderbi@144.49.211.130.bc.googleusercontent.com] has quit [Ping timeout: 256 seconds] 13:52 -!- k3tan [~pi@unaffiliated/k3tan] has quit [Ping timeout: 272 seconds] 13:52 -!- k3tan [~pi@unaffiliated/k3tan] has joined #c-lightning 14:19 -!- belcher [~belcher@unaffiliated/belcher] has quit [Read error: Connection reset by peer] 14:20 -!- belcher [~belcher@unaffiliated/belcher] has joined #c-lightning 14:29 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 14:29 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 14:30 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 14:30 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #c-lightning 14:35 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 14:36 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #c-lightning 15:43 -!- queip [~queip@unaffiliated/rezurus] has quit [Ping timeout: 246 seconds] 16:19 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 16:59 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 16:59 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 17:24 -!- belcher [~belcher@unaffiliated/belcher] has quit [Quit: Leaving] 17:44 -!- belcher [~belcher@unaffiliated/belcher] has joined #c-lightning 17:44 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 17:45 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #c-lightning 17:47 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 19:30 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 20:15 -!- zmnscpxj__ [~zmnscpxj@gateway/tor-sasl/zmnscpxj] has joined #c-lightning 20:17 -!- zmnscpxj_ [~zmnscpxj@gateway/tor-sasl/zmnscpxj] has quit [Ping timeout: 240 seconds] 20:57 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Ping timeout: 272 seconds] 21:03 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 21:05 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 21:18 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 21:23 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 21:37 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 21:39 -!- vasild [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 21:41 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 21:42 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Client Quit] 22:17 -!- treehug88 [~textual@pool-71-105-170-196.nycmny.fios.verizon.net] has quit [Quit: Textual IRC Client: www.textualapp.com] 22:43 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has quit [Remote host closed the connection] 22:45 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has joined #c-lightning --- Log closed Sun May 10 00:00:16 2020