Skip to content

Commit

Permalink
Merge pull request #129 from pimoroni/patch/version_logging
Browse files Browse the repository at this point in the history
Added logging of the current enviro and micropython version
  • Loading branch information
ZodiusInfuser authored Dec 13, 2022
2 parents bafd8dd + c96659b commit a9e2eb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions enviro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,11 @@ def upload_readings():
return True

def startup():
# write startup banner into log file
logging.debug("> performing startup")
import sys

# write startup info into log file
logging.info("> performing startup")
logging.debug(f" - running Enviro {ENVIRO_VERSION}, {sys.version.split('; ')[1]}")

# get the reason we were woken up
reason = get_wake_reason()
Expand Down
3 changes: 3 additions & 0 deletions enviro/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# version
ENVIRO_VERSION = "0.0.9"

# modules
ENVIRO_UNKNOWN = None
ENVIRO_INDOOR = 1
Expand Down

0 comments on commit a9e2eb9

Please sign in to comment.