Wednesday, January 21, 2026
HomeLanguagesPython – tensorflow.get_logger()

Python – tensorflow.get_logger()

TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. 

get_logger() is used to get the logger instance.

Syntax: tensorflow.get_logger()

Parameters: It doesn’t accept any parameters.

Returns: It returns the logger instance.

Example 1:

Python3




# Importing the library
import tensorflow as tf
 
# Getting logger instance
logger = tf.get_logger()
 
# Checking if propagation is enabled
res = logger.propagate
 
# Printing the result
print('res: ',res)


Output:

res:  True

Example 2:

Python3




# Importing the library
import tensorflow as tf
 
# Getting logger instance
logger = tf.get_logger()
 
# Disabling the propagation
logger.propagate = False
 
# Checking if propagation is enabled
res = logger.propagate
 
# Printing the result
print('res: ',res)


Output:

res:  False
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

1 COMMENT

Most Popular

Dominic
32475 POSTS0 COMMENTS
Milvus
119 POSTS0 COMMENTS
Nango Kala
6847 POSTS0 COMMENTS
Nicole Veronica
11977 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12064 POSTS0 COMMENTS
Shaida Kate Naidoo
6986 POSTS0 COMMENTS
Ted Musemwa
7220 POSTS0 COMMENTS
Thapelo Manthata
6933 POSTS0 COMMENTS
Umr Jansen
6912 POSTS0 COMMENTS