-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use structured logging #105
Merged
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
1de95b1
Trying to utilize adafruit_logging package. Ran into memory allocatio…
blakejameson e6e8918
deleting adafruit_logging.mpy file
blakejameson 4b943bf
added adafruit_logging to the lib requirements.txt
blakejameson f5e8b45
started working on Logger class
blakejameson 990f8fd
created base functions for the Logger
blakejameson 0d8f2f5
modifying Logger class implementation
blakejameson b8ccb55
removing FC_Board from repo
blakejameson 2d21edf
instantiated Logger in main.py
blakejameson 686d4fb
testing out different formatting for log output. Extra code remains t…
blakejameson f2b6deb
continuing to develop Logger class. still very early on in process
e03d93c
adding a debug vs print mode to the Logger class
95501e6
removing unneccesary output previously in logger.py, incorporated a f…
blakejameson f9f8c48
converting more debug print and print statements into logging calls
blakejameson 8312998
changed debug_print and print statements in functions.py to be logger…
blakejameson 2cab8c1
defined a Logger as a parameter for functions in cdh.py. This way, a …
blakejameson a5c9352
changed print statements in Field.py to be logger function calls
blakejameson 57efb43
replace print statements with logger function calls in packet_manager
blakejameson 528c8c7
replace print statements with logger function calls in packet_sender.py
blakejameson 81ac401
changed debug_print calls in pysquared.py to use the logger instead. …
blakejameson e6e0b2b
refactored Face and AllFaces class constructor to take a logger as pa…
blakejameson 30c77c3
had once missed a line of code I previously forgot to remove
blakejameson b9ef668
moved super secret code print statement from cdh.py to functions.py a…
blakejameson e8cefe2
needed to change function call, as I had updated the logger function …
blakejameson 12e783f
changed hardware initialiation to use logger instead of printing the …
blakejameson 786ff55
fixing a function call that forgot an argument
blakejameson f5f2545
defined the critical function in the Logger
blakejameson 6d84457
changed print statements to Logger function calls in battery_helper.py
blakejameson bdb30a3
added logger as 3rd argument to Field constructor calls. added logger…
blakejameson aaeb9a7
added member variable to Logger class pertaining to the logger loggin…
blakejameson 70e72bc
removed lines commented out with print and debug_print, as they were …
blakejameson acb31c3
refactored _scan_single_channel method to use logger methods instead …
blakejameson 000bd26
removed enum that will no longer be used in the Logger class
blakejameson 4b436cc
removed comments no longer needed
blakejameson abaa7a9
Finished rebasing then cleaned up a few resulting lint errors
blakejameson 0079c5b
changed leftover debug_print function calls to Logger function calls.…
blakejameson 6673f16
Structured logging: DRYing and adding comments (#109)
nateinaction 898fb5a
removing the filename argument from the Logger function calls
blakejameson ae762ce
Update lib/pysquared/battery_helper.py
blakejameson bf0a94a
Update main.py
blakejameson 4a447aa
Update lib/pysquared/battery_helper.py
blakejameson 57a8cbc
Update lib/pysquared/battery_helper.py
blakejameson ff73609
removed the 'message=' from the function calls
blakejameson a8713d8
Merge branch 'main' into use-structured-logging
59b7d7d
replacing message strings with variables injected to be kwargs instead
blakejameson 1776292
replacing more message strings with variables injected to be kwargs i…
blakejameson c25feef
continuing to remove variables from message strings, moving them into…
blakejameson 8371060
removed more variables from message strings. created key/value pairs …
blakejameson ce37974
changed name of kwarg to be something other than msg, as that keyword…
blakejameson bcf3685
added tests to the other 4 log methods
blakejameson a3dfd8f
fixing unintended typo that somehow made its way in
blakejameson 246c828
Applying suggestions from Nate's code review
blakejameson 664022f
removing debug_print function definitions from many files. changed pa…
blakejameson b75082d
fixed PacketSender constructor function call to include Logger
blakejameson 210c122
Apply suggestions from Nate's code review
blakejameson c53d83d
fixed typo in the word 'initializing' and type hinted in the Logger c…
blakejameson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting for the future that we talked about removing traceback and we couldn't find a reason to keep it. We tried both in repl and found that reporting back the exception var
e
gave the same output but maybe we missed something. 🤷