[geodisambig] Python scripts to prep GeoNames records for trie insertion
This commit is contained in:
10
scripts/geodata/log.py
Normal file
10
scripts/geodata/log.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import logging
|
||||
import sys
|
||||
|
||||
|
||||
def log_to_stdout(level=logging.INFO):
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
formatter = logging.Formatter('%(asctime)s %(levelname)s [%(name)s]: %(message)s')
|
||||
handler.setFormatter(formatter)
|
||||
logging.root.addHandler(handler)
|
||||
logging.root.setLevel(level)
|
||||
Reference in New Issue
Block a user