File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
packages/databricks-vscode/resources/python Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 3737}
3838
3939# Set log level to "ERROR". See https://kb.databricks.com/notebooks/cmd-c-on-object-id-p0.html
40- import logging ; logger = spark ._jvm .org .apache .log4j ;
41- logging .getLogger ("py4j.java_gateway" ).setLevel (logging .ERROR )
40+ try :
41+ import logging ; logger = spark ._jvm .org .apache .log4j ;
42+ logging .getLogger ("py4j.java_gateway" ).setLevel (logging .ERROR )
43+ except Exception as e :
44+ logging .debug ("Failed to set py4j.java_gateway log level to ERROR" , exc_info = True )
45+ pass
4246
4347runpy .run_path (python_file , run_name = "__main__" , init_globals = user_ns )
4448None
Original file line number Diff line number Diff line change 2727 "sqlContext" : sqlContext ,
2828}
2929
30- # Set log level to "ERROR". See https://kb.databricks.com/notebooks/cmd-c-on-object-id-p0.html
31- import logging ; logger = spark ._jvm .org .apache .log4j ;
32- logging .getLogger ("py4j.java_gateway" ).setLevel (logging .ERROR )
30+ try :
31+ # Set log level to "ERROR". See https://kb.databricks.com/notebooks/cmd-c-on-object-id-p0.html
32+ import logging ; logger = spark ._jvm .org .apache .log4j ;
33+ logging .getLogger ("py4j.java_gateway" ).setLevel (logging .ERROR )
34+ except Exception as e :
35+ logging .debug ("Failed to set py4j.java_gateway log level to ERROR" , exc_info = True )
36+ pass
3337
3438runpy .run_path (python_file , run_name = "__main__" , init_globals = user_ns )
3539None
You can’t perform that action at this time.
0 commit comments