Skip to content

Instantly share code, notes, and snippets.

@philippegirard
Created April 18, 2020 20:14
Show Gist options
  • Save philippegirard/abede279c0160403f0b6725c67a13709 to your computer and use it in GitHub Desktop.
Save philippegirard/abede279c0160403f0b6725c67a13709 to your computer and use it in GitHub Desktop.
fastapi logging services
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