<jupyter_start><jupyter_text>log to stdout<jupyter_code>import logging
import os 
import sys

logging.basicConfig(
    format="%(asctime)s | %(levelname)s | %(name)s |  [%(filename)s:%(lineno)d] %(message)s",
    datefmt="%Y-%m-%d %H:%M:%S",
    level=os.environ.get("LOGLEVEL", "INFO").upper(),
    stream=sys.stdout,
)

logger = logging.getLogger(__name__)


logger.info("Testing hello world")<jupyter_output>2021-12-30 21:14:45 | INFO | __main__ |  [2641727754.py:15] Testing hello world
{'fraction_non_alphanumeric': 0.1836734693877551, 'fraction_numerical': 0.053061224489795916, 'mean_word_length': 5.635135135135135, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '518990', 'license': 'MIT', 'n_tokens_mistral': 215, 'n_tokens_neox': 194, 'n_words': 31, 'path': 'notebooks/logging/builtinlogging/log2stdout.ipynb', 'repo_name': 'codenamewei/pydata-science-playground', 'size': '490'}