Debug logging with ell
Stotland
Hi all,
Quick question: can I use l_debug() when I am dynamically linking with installed ell library (i.e., the one created with make install and linked as -lell)?
Calling l_debug() generates no output, l_info() works just fine.
When I link with libell-private, l_debug works as expected. Something to do with debug mem sections?
I would rather not write my own logging if l_debug() is available.
Thanks,
Inga
Othman
Hi Inga,
Quoted 11 lines · Inga
Quick question: can I use
l_debug()when I am dynamically linking with installed ell library (i.e., the one created with make install and linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.When I link with libell-private,
l_debugworks as expected. Something to do with debug mem sections?I would rather not write my own logging if
l_debug()is available.
Try enabling debug logging at run-time, e.g.: l_debug_enable("*");
HTH!
-Ossama
Stotland
Hi Ossama,
Quoted 11 lines · Ossama
Hi Inga,
Quoted 7 lines · Inga
Quick question: can I use
l_debug()when I am dynamically linking with
installed ell library (i.e., the one created with make install and linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.
Quoted 8 lines
Quoted 6 lines
When I link with libell-private,
l_debugworks as expected. Something
to do with debug mem sections?I would rather not write my own logging if
l_debug()is available.Try enabling debug logging at run-time, e.g.:
l_debug_enable("*");
I do have the following statements in my code:l_log_set_stderr();l_debug_enable("*");
Thanks,
Inga
Othman
Hi Inga,
Quoted 14 lines · Inga
Quoted 13 lines · Ossama
Quoted 10 lines · Inga
Quick question: can I use
l_debug()when I am dynamically linking with
installed ell library (i.e., the one created with make install and linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.When I link with libell-private,
l_debugworks as expected. Something
to do with debug mem sections?
Quoted 5 lines
Quoted 1 line
Try enabling debug logging at run-time, e.g.:
l_debug_enable("*");I do have the following statements in my code:
l_log_set_stderr();l_debug_enable("*");
I suppose l_debug() wouldn't have worked when you linked against libell-private otherwise. Sorry. I missed that. :)
In any case, this certainly used to work. I was able to reproduce the same problem you ran into as well, but I'm not sure what changed.
-Ossama
Hi Inga,
Quoted 7 lines · Inga
Hi all,
Quick question: can I use
l_debug()when I am dynamically linking with installed ell library (i.e., the one created with make install and linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.
I suspect you're the first to try this, so doesn't surprise me that it doesn't work. I imagine the current setup fails because the shared library has its own section and the executable has its own.
Probably can be solved with some macro magic, but will require a bit of surgery inside ell...
Regards,
-Denis
Othman
Hi Denis,
On Tue, Apr 24, 2018 at 1:30 PM, Denis Kenzior <[email protected]> wrote:>
Quoted 6 lines
Quoted 5 lines
Quick question: can I use
l_debug()when I am dynamically linking with installed ell library (i.e., the one created with make install and linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.
Quoted 6 lines
I suspect you're the first to try this, so doesn't surprise me that it doesn't work. I imagine the current setup fails because the shared library has its own section and the executable has its own.
Probably can be solved with some macro magic, but will require a bit of surgery inside ell...
This used to work for me, but prior to today the last time I tried enabling debug logging code was probably a couple of months ago.
-Ossama
Stotland
Hi Ossama, Denis,
A.
Quoted 18 lines · Ossama
Hi Denis,
On Tue, Apr 24, 2018 at 1:30 PM, Denis Kenzior <[email protected]> wrote:>
Quoted 14 lines
Quoted 7 lines
Quick question: can I use
l_debug()when I am dynamically linking with
installed ell library (i.e., the one created with make install and
linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.I suspect you're the first to try this, so doesn't surprise me that it
doesn't work. I imagine the current setup fails because the shared library
has its own section and the executable has its own.
Quoted 7 lines
Quoted 3 lines
Probably can be solved with some macro magic, but will require a bit of
surgery inside ell...This used to work for me, but prior to today the last time I tried enabling debug logging code was probably a couple of months ago.
Most likely to do with memory sections. One additional piece of info in case it's helpful:
The section denoted by __start___debug[] and __stop___debug[] appears to be shorter by size of one struct l_debug_desc when linking with -lell (compared when compiled with internal lib).
Inga
Hi Inga,
Quoted 6 lines · Inga
Hi all,
Quick question: can I use
l_debug()when I am dynamically linking with installed ell library (i.e., the one created with make install and linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.
So this should work now. I've pushed a couple of fixes upstream.
Regards,
-Denis
Othman
Hi Denis,
Quoted 8 lines · Denis Kenzior
Quoted 5 lines · Inga
Quick question: can I use
l_debug()when I am dynamically linking with installed ell library (i.e., the one created with make install and linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.So this should work now. I've pushed a couple of fixes upstream.
Confirmed. Debug logging works against a dynamically linked libell for my use case.
Thanks!
-Ossama
Stotland
Hi Denis,
Quoted 5 lines · Denis Kenzior
Hi Inga,
Quoted 2 lines · Inga
Hi all,
Quoted 8 lines
Quoted 5 lines
Quick question: can I use
l_debug()when I am dynamically linking with
installed ell library (i.e., the one created with make install and linked as -lell)?
Callingl_debug()generates no output,l_info()works just fine.So this should work now. I've pushed a couple of fixes upstream.
Tested and it works now.
Thank you,
Inga