Skip to content

Commit

Permalink
add logging initialization only if run directly
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Feb 29, 2024
1 parent 23bc70c commit 27b22f8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/besapi/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"""
To run this module directly
"""

import logging

from bescli import bescli

logging.basicConfig()
bescli.main()
1 change: 1 addition & 0 deletions src/besapi/besapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,4 +999,5 @@ def main():


if __name__ == "__main__":
logging.basicConfig()
main()
4 changes: 4 additions & 0 deletions src/bescli/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"""
To run this module directly
"""

import logging

from . import bescli

logging.basicConfig()
bescli.main()
1 change: 1 addition & 0 deletions src/bescli/bescli.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,5 @@ def main():


if __name__ == "__main__":
logging.basicConfig()
main()

0 comments on commit 27b22f8

Please sign in to comment.