-
Notifications
You must be signed in to change notification settings - Fork 4
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
Debug logging #323
base: master
Are you sure you want to change the base?
Debug logging #323
Conversation
@@ -131,7 +131,9 @@ export function* tryProgramNewSensor({ | |||
); | |||
ToastAndroid.show(`Connected and setup ${macAddress}`, ToastAndroid.SHORT); | |||
} catch (e) { | |||
yield put(ProgramAction.programNewSensorFail(macAddress, e?.toString())); | |||
yield put( | |||
ProgramAction.programNewSensorFail(macAddress, e?.toString() ?? 'FAILED TO PROGRAM SENSOR') |
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.
This is a side track but was giving me errors...
@@ -123,6 +124,22 @@ export const DependencyContainer: FC = ({ children }) => { | |||
})(); | |||
}, []); | |||
|
|||
useEffect(() => { |
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.
Above we are settings ready = true and we have all of the services available (without query to DependencyLocator), I think we should move this logic there
I would increase number of logs we keep: Debug-Logging...Debug-Logging(Increase-number-of-logs-we-keep) |
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.
Looks great thanks, just some suggestions.
I think we should increase how much logs we are saving, especially once below takes place
Also to solve this issue (in another PR): #318, I think we need some raw data from:
saveLogs = async (logsToSave: Partial<TemperatureLog>[]): Promise<TemperatureLog[]> => { |
msupply-cold-chain/.yalc/@openmsupply/msupply-ble-service/src/Bluetooth/BleService.ts
Line 307 in b2fd992
) => { |
data
, we could add automated test after that
I guess above would need to be under 'Debug' log levels ?
…e-number-of-logs-we-keep) Increase number of logs we keep
Fixes #322
I couldn't figure out a good pattern for enabling it on start up.
After various different attempts I've put it into the DependancyContainer.
Probably not the right place but figure if it's working, it's better then nothing?