Change verbose level on pyc3 connection


#1

Is there a way to avoid printing c3 calls from Jupyter notebook.
e.g MyType.evalMetrics took … ms

Basically I want to change the level of verbose on the pyc3 connection…


#2

You can try with:

Cluster.setLogLevel(loggerName, loggingLevel, timeInSeconds)

E.g. for logs like

2018-07-31T15:37:26.724Z level=INFO thread="Hannibal-22" logger=c3.action a_id="2827.256203226" a_rid="2827.256203215" a_pid="2827.256203215" 
childReq,t_tenant=mytenant,t_module=jms,t_tag=prod,t_type=JMS,t_action=listQueues,a_st=Complete,a_t=0.005966,a_cpu=0.005961,a_self=0.005961,a_self_cpu=0.005961,a_wt=0.000004,a_cache_key="",a_user="authorizer",a_func="228.116",a_pids=":2827.256203215:",a_pfuncs=":217.211:"

You can eliminate them by increase the log level to ERROR

Cluster.setLogLevel('c3.action','ERROR', 360)

#3

For pyc3, I believe you should be able to do:
c3 = C3ServerConnection("https://my-environment.c3iot.com","tenant","tag", timing=False)
to stop printing the time it takes to execute a c3 call. This may get reset to logging again permanently if you call c3.s3_download (a bug) - to work around the latter, you’ll have to do c3._timing=False after running c3.s3_download.

I think Bachir’s response is for turning down log levels for c3 server.