Skip to content

Instantly share code, notes, and snippets.

@ryanlong1004
Created March 29, 2022 01:14
Show Gist options
  • Save ryanlong1004/232fd8041f09683d8a33a3679cd25f1d to your computer and use it in GitHub Desktop.
Save ryanlong1004/232fd8041f09683d8a33a3679cd25f1d to your computer and use it in GitHub Desktop.
python logging basic
import logging
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s %(name)-12s %(levelname)-8s %(message)s",
handlers=[logging.FileHandler("archive_results.log"), logging.StreamHandler()],
)
def main():
pass
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment