|
1 | 1 | # Python-Interview-Questions |
2 | 2 | * Logger.info(msg) : This will log a message with level INFO on this logger. |
3 | 3 | * Logger.warning(msg) : This will log a message with level WARNING on this logger. |
4 | | -# Logger.error(msg) : This will log a message with level ERROR on this logger. |
5 | | -Logger.critical(msg) : This will log a message with level CRITICAL on this logger. |
6 | | -Logger.log(lvl,msg) : This will Logs a message with integer level lvl on this logger. |
7 | | -Logger.exception(msg) : This will log a message with level ERROR on this logger. |
8 | | -Logger.setLevel(lvl) : This function sets the threshold of this logger to lvl. This means that all the messages below this level will be ignored. |
9 | | -Logger.addFilter(filt) : This adds a specific filter filt to the to this logger. |
10 | | -Logger.removeFilter(filt) : This removes a specific filter filt to the to this logger. |
11 | | -Logger.filter(record) : This method applies the logger’s filter to the record provided and returns True if record is to be processed. Else, it will return False. |
12 | | -Logger.addHandler(hdlr) : This adds a specific handler hdlr to the to this logger. |
13 | | -Logger.removeHandler(hdlr) : This removes a specific handler hdlr to the to this logger. |
14 | | -Logger.hasHandlers() : This checks if the logger has any handler configured or not. |
| 4 | +* Logger.error(msg) : This will log a message with level ERROR on this logger. |
| 5 | +* Logger.critical(msg) : This will log a message with level CRITICAL on this logger. |
| 6 | +* Logger.log(lvl,msg) : This will Logs a message with integer level lvl on this logger. |
| 7 | +* Logger.exception(msg) : This will log a message with level ERROR on this logger. |
| 8 | +* Logger.setLevel(lvl) : This function sets the threshold of this logger to lvl. This means that all the messages below this level will be ignored. |
| 9 | +* Logger.addFilter(filt) : This adds a specific filter filt to the to this logger. |
| 10 | +* Logger.removeFilter(filt) : This removes a specific filter filt to the to this logger. |
| 11 | +* Logger.filter(record) : This method applies the logger’s filter to the record provided and returns True if record is to be processed. Else, it will return False. |
| 12 | +* Logger.addHandler(hdlr) : This adds a specific handler hdlr to the to this logger. |
| 13 | +* Logger.removeHandler(hdlr) : This removes a specific handler hdlr to the to this logger. |
| 14 | +* Logger.hasHandlers() : This checks if the logger has any handler configured or not. |
0 commit comments