For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| logging.warning("this is a warning!") | |
| logging.info("just a piece of information.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| logging.basicConfig(filename='.log', encoding='utf-8', level=logging.DEBUG) | |
| logging.debug("this is for debug.") | |
| logging.info("just a piece of information.") | |
| logging.warning("this is a warning!") | |
| logging.error("an error has occurred") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import module | |
| def main(): | |
| logging.basicConfig(filename='.log', encoding='utf-8', level=logging.DEBUG) | |
| logging.info("main is calling do_something from module") | |
| module.do_something() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| def do_something(): | |
| print("call this to do somthing") | |
| logging.debug("do somthing executed.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| from module import lib | |
| def main(): | |
| logging.basicConfig(filename='.log', encoding='utf-8', level=logging.DEBUG) | |
| logging.info("main is calling do_something from module") | |
| lib.do_something() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| def do_something(): | |
| print("call this to do somthing") | |
| logging.debug("do somthing executed in module-lib.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| # configure logging in module_x | |
| # get the named logger object | |
| logger = logging.getLogger(__name__) | |
| # update logging level | |
| logger.setLevel(logging.DEBUG) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| # configure logging module_y | |
| # get the named logger object | |
| logger = logging.getLogger(__name__) | |
| # update logging level | |
| logger.setLevel(logging.DEBUG) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| from package.module_x import lib_x | |
| from package.module_y import lib_y | |
| # configure logging in user program | |
| # get the named logger object | |
| logger = logging.getLogger(__name__) | |
| # update logging level |
OlderNewer