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.
16 lines
478 B
16 lines
478 B
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()
|
|
|