title: How to toggle Jupyter Notebook display logging
body: <p>I am trying to apply logging to Jupyter Notebook's <code>display(df)</code> functionality. How do I edit the last line of my code so that the dataframe is only displayed if logging INFO is active? Currently it's shown whether the logging is active or inactive.</p>
  
  <pre><code>import pandas as pd
  
  logging.basicConfig(level=logging.INFO, format=' %(asctime)s - %(levelname)s - %(message)s')
  
  filename = 'test.csv'
  df=pd.read_csv(filename, index_col=None, encoding='utf-8')
  
  logging.info(display(df))
  </code></pre>