<div dir="ltr">Hi Yves,<div><br></div><div>You might want to enable all the python events via </div><div>'lttng enable-event -p -a'.</div><div><br></div><div>Cheers!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 13, 2015 at 10:46 AM, Yves Junior Bationo <span dir="ltr"><<a href="mailto:yves-junior.bationo@polymtl.ca" target="_blank">yves-junior.bationo@polymtl.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
Adding "logging.basicConfig()" seems to work well. "lttng list -u -a" return the list of all python log<br>
BUT<br>
after enabling all event trace (lttng enable-event -u -a)<br>
the trace contain only  "lttng_ust_statedump" event, and not a single event from the script (warning,error... )<br>
THKs!<br>
Yves<br>
<br>
Jonathan Rajotte Julien <<a href="mailto:Jonathan.rajotte-julien@efficios.com" target="_blank">Jonathan.rajotte-julien@efficios.com</a>> a écrit :<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Yves,<br>
<br>
We are currently looking a little bit more into it. It might be an error in the documentation.<br>
<br>
The example report the same error without the 'import lttngust'. If you use python 3 it seems to work.<br>
<br>
This seems related to the logging.basicConfig() which provide as basic configuration for the root handler. See [1] for more info.<br>
<br>
For now you can simply add the logging.basicConfig() before everything.<br>
I'm not sure if this is a workaround or simply how logging in python works in general.<br>
<br>
Cheers!<br>
<br>
[1] <a href="https://docs.python.org/2/library/logging.html#logging.basicConfig" rel="noreferrer" target="_blank">https://docs.python.org/2/library/logging.html#logging.basicConfig</a><br>
<br>
On 2015-11-12 01:21 PM, Yves Junior Bationo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I installed liblttng-ust-dev from ppa:lttng/ppa<br>
lttng version: (LTTng Trace Control) 2.7.0 - Herbe à Détourne<br>
<br>
Yves Junior Bationo <<a href="mailto:yves-junior.bationo@polymtl.ca" target="_blank">yves-junior.bationo@polymtl.ca</a>> a écrit :<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, i my script i just change "my-logger" by "hello-logger" (hello.py in attachment).<br>
I try to figure out the probem by<br>
       export LTTNG_UST_PYTHON_DEBUG=1<br>
and i found this:<br>
#####<br>
[0.019155] LTTng-UST debug: <module>(): debug is enabled<br>
[0.024447] LTTng-UST debug: _init_threads(): entering<br>
[0.024710] LTTng-UST debug: _get_port_from_file(): reading port from file "/var/run/lttng/agent.port"<br>
[0.025745] LTTng-UST debug: _get_port_from_file(): reading port from file "/root/.lttng/agent.port"<br>
[0.025942] LTTng-UST debug: _init_threads(): system session daemon port: 5345<br>
[0.026117] LTTng-UST debug: _init_threads(): user session daemon port: None<br>
[0.026280] LTTng-UST debug: _init_threads(): creating system client thread<br>
[0.026762] LTTng-UST debug: _init_threads(): created and started system client thread<br>
[0.026973] LTTng-UST debug: _init_threads(): waiting for registration done (expecting 1, timeout is 5.0 s)<br>
[0.027721] LTTng-UST debug: _client_thread_target(): creating client "system" using TCP port 5345<br>
[0.029745] LTTng-UST debug: _client_thread_target(): starting client "system"<br>
[0.029896] LTTng-UST debug: run(): client "system": connecting to session daemon<br>
[0.030117] LTTng-UST debug: run(): client "system": registering to session daemon<br>
[0.030370] LTTng-UST debug: _recv_server_cmd_header(): client "system": received empty server command header<br>
[0.030532] LTTng-UST debug: _handle_server_cmd(): client "system": bad server command<br>
[0.030667] LTTng-UST debug: run(): client "system": got exception: 'module' object has no attribute '_ClientCmdReply'<br>
####<br>
You can see 'bad server command' and 'exception' in the last lines.<br>
<br>
Jérémie Galarneau <<a href="mailto:jeremie.galarneau@efficios.com" target="_blank">jeremie.galarneau@efficios.com</a>> a écrit :<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2015-11-06 17:59 GMT-05:00 Yves Junior Bationo <<a href="mailto:yves-junior.bationo@polymtl.ca" target="_blank">yves-junior.bationo@polymtl.ca</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
j'ai un souci avec lltngust pour les application python<br>
Pour l'exemple de la Doc<br>
      <a href="https://lttng.org/docs/#doc-python-application" rel="noreferrer" target="_blank">https://lttng.org/docs/#doc-python-application</a><br>
j'ai l'erreur:<br>
      No handlers could be found for logger "hello-logger"<br>
<br>
</blockquote>
<br>
Hi Yves,<br>
<br>
We try to stick to English on this mailing list so the questions and<br>
answers remain easily searchable.<br>
<br>
The example in the docs uses "time" without importing it, I have sent<br>
a Pull Request to address that.<br>
However, addressing the problem you are encountering, where does<br>
"hello-logger" come from?<br>
<br>
Can you post the code and versions of the components you are using?<br>
<br>
Thanks,<br>
Jérémie<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
la commande "lttng list -u -a" me retourne bien la liste des trace point:<br>
<br>
      PID: 5228 - Name: python<br>
    lttng_python:event (loglevel: TRACE_DEBUG_LINE (13)) (type:<br>
tracepoint)<br>
    lttng_ust_tracelog:TRACE_DEBUG (loglevel: TRACE_DEBUG (14)) (type:<br>
tracepoint)<br>
    lttng_ust_tracelog:TRACE_DEBUG_LINE (loglevel: TRACE_DEBUG_LINE (13))<br>
(type: tracepoint)<br>
    lttng_ust_tracelog:TRACE_DEBUG_FUNCTION (loglevel:<br>
TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)<br>
    lttng_ust_tracelog:TRACE_DEBUG_UNIT (loglevel: TRACE_DEBUG_UNIT (11))<br>
(type: tracepoint)<br>
    lttng_ust_tracelog:TRACE_DEBUG_MODULE (loglevel: TRACE_DEBUG_MODULE<br>
(10)) (type: tracepoint)<br>
    lttng_ust_tracelog:TRACE_DEBUG_PROCESS (loglevel: TRACE_DEBUG_PROCESS<br>
(9)) (type: tracepoint)<br>
    lttng_ust_tracelog:TRACE_DEBUG_PROGRAM (loglevel: TRACE_DEBUG_PROGRAM<br>
(8)) (type: tracepoint)<br>
    lttng_ust_tracelog:TRACE_DEBUG_SYSTEM (loglevel: TRACE_DEBUG_SYSTEM<br>
(7)) (type: tracepoint)<br>
    lttng_ust_tracelog:TRACE_INFO (loglevel: TRACE_INFO (6)) (type:<br>
tracepoint)<br>
    lttng_ust_tracelog:TRACE_NOTICE (loglevel: TRACE_NOTICE (5)) (type:<br>
tracepoint)<br>
    lttng_ust_tracelog:TRACE_WARNING (loglevel: TRACE_WARNING (4)) (type:<br>
tracepoint)<br>
    lttng_ust_tracelog:TRACE_ERR (loglevel: TRACE_ERR (3)) (type:<br>
tracepoint)<br>
    lttng_ust_tracelog:TRACE_CRIT (loglevel: TRACE_CRIT (2)) (type:<br>
tracepoint)<br>
    lttng_ust_tracelog:TRACE_ALERT (loglevel: TRACE_ALERT (1)) (type:<br>
tracepoint)<br>
    lttng_ust_tracelog:TRACE_EMERG (loglevel: TRACE_EMERG (0)) (type:<br>
tracepoint)<br>
    lttng_ust_tracef:event (loglevel: TRACE_DEBUG (14)) (type: tracepoint)<br>
    lttng_ust_statedump:end (loglevel: TRACE_DEBUG_LINE (13)) (type:<br>
tracepoint)<br>
    lttng_ust_statedump:debug_link (loglevel: TRACE_DEBUG_LINE (13))<br>
(type: tracepoint)<br>
    lttng_ust_statedump:build_id (loglevel: TRACE_DEBUG_LINE (13)) (type:<br>
tracepoint)<br>
    lttng_ust_statedump:soinfo (loglevel: TRACE_DEBUG_LINE (13)) (type:<br>
tracepoint)<br>
    lttng_ust_statedump:start (loglevel: TRACE_DEBUG_LINE (13)) (type:<br>
tracepoint)<br>
<br>
Mais pas de resultats dans le repertoire des evenements lorsque j'active le<br>
tracage lttng.<br>
<br>
Resumé<br>
      Probleme 1 :No handlers could be found for logger<br>
              je croyais que "import lttngust" devait gerer cette<br>
situation<br>
<br>
      Probleme 2: pas de resultats au tracage<br>
Merci.<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
<a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</blockquote>
<br>
<br>
<br>
-- <br>
Jérémie Galarneau<br>
EfficiOS Inc.<br>
<a href="http://www.efficios.com" rel="noreferrer" target="_blank">http://www.efficios.com</a><br>
</blockquote></blockquote>
<br>
<br>
<br>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
<a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</blockquote>
<br>
-- <br>
Jonathan R. Julien<br>
Efficios<br>
</blockquote>
<br>
<br>
<br>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
<a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Jonathan Rajotte Julien<div><br></div></div></div></div></div>
</div>