Skip to content
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

Fix log files not containing any newlines ever #65

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

aggieNick02
Copy link
Contributor

This fixes #64

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix @aggieNick02! I tested this successfully on a Pyportal Titano using slightly modified version of the filehandler example from this repo.

The currently released version does not include newlines for the "regular" logger functions like debug(), info(), error() etc.. There are some newlines when you use logger.exception(e) but only the ones that come from the exception itself, the first line of the exception is not preceded by a newline so it ends up at the end of a long line of everything that came before it.

In the version from this PR the "regular" functions do correctly get newlines for each message and the exception() output still contains it's relevant newlines also.

@FoamyGuy FoamyGuy merged commit af7b881 into adafruit:main Oct 2, 2024
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 3, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_PM25 to 2.1.17 from 2.1.16:
  > Merge pull request adafruit/Adafruit_CircuitPython_PM25#28 from snkYmkrct/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_SCD4X to 1.4.4 from 1.4.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_SCD4X#23 from snkYmkrct/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_SHT4x to 1.0.20 from 1.0.19:
  > Merge pull request adafruit/Adafruit_CircuitPython_SHT4x#15 from snkYmkrct/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1680 to 1.2.3 from 1.2.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1680#26 from adafruit/redundant-constructor

Updating https://github.com/adafruit/Adafruit_CircuitPython_Logging to 5.5.1 from 5.5.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Logging#65 from PCPartPicker/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No newlines ever in logs produced with FileHandler/RotatingFileHandler
2 participants