You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
478 B
17 lines
478 B
2 years ago
|
import logging
|
||
|
import log1
|
||
|
import log2
|
||
|
|
||
|
# See also https://python101.pythonlibrary.org/chapter15_logging.html
|
||
|
|
||
|
logger = logging.getLogger(__name__)
|
||
|
|
||
|
logging.basicConfig(format='%(module)s - %(name)s - %(asctime)s -'
|
||
|
' %(funcName)s - %(message)s', filename='test.log', filemode='w', level=logging.INFO)
|
||
|
|
||
|
#logging.basicConfig(filename='test.log', filemode='w', level=logging.INFO)
|
||
|
for i in range(10):
|
||
|
logger.info(f'called {i} times')
|
||
|
log1.test1()
|
||
|
log2.test2()
|