Created
April 18, 2020 20:14
-
-
Save philippegirard/abede279c0160403f0b6725c67a13709 to your computer and use it in GitHub Desktop.
fastapi logging services
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 | |
logger = logging.getLogger(__name__) # the __name__ resolve to "uicheckapp.services" | |
# This will load the uicheckapp logger | |
class EchoService: | |
def echo(self, msg): | |
logger.info("echoing something from the uicheckapp logger") | |
print(msg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment