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