tari-project / universe

Other
8 stars 24 forks source link

chore(logging): optimize logging and initialization #880

Closed Krakaw closed 1 week ago

Krakaw commented 1 week ago

Description

The frontend was controlling the application initialization process, which means we got caught with some lifecycle issues where a useEffect hook was triggering the setup_application invocation multiple times. I added a little debounce mechanism to the call. We had unnecessary logging, moved some to trace as well as only emit a log if a state has changed.

Motivation and Context

The logs were overflowing with useless information. This just streamlines it a little. The app was needlessly resetting the application state.

How Has This Been Tested?

I ran the app, the logs are cleaner and there is less duplication of initialization.

What process can a PR reviewer use to test or verify this change?

Run the app, make sure nothing is broken.

Breaking Changes

Anziskavds commented 1 week ago

Tested by doing a reset, then start up and looked if the log files are smaller. It tested unsuccessful. The log files was bigger after the reset. Tested on Testnet 0.5.31 on a MacBook Air 13 inch M1 2020.

Anziskavds commented 1 week ago

Message from Keith image. I followed steps received from Mike but it's not the correct requirements. As per the requiremnt Keith provided it tested successfully on a MacBook Air 13 inch M1 2020 on Testnet 0.5.31.