Change logging
1. Remove a few needless logs 2. Label where the logs are coming from
This commit is contained in:
parent
5ce3b9e69c
commit
9b881c3d58
2
App.tsx
2
App.tsx
|
@ -55,7 +55,7 @@ const App = () => {
|
||||||
await AppDataSource.initialize().catch((e) => setError(e.toString()));
|
await AppDataSource.initialize().catch((e) => setError(e.toString()));
|
||||||
|
|
||||||
const gotSettings = await settingsRepo.findOne({ where: {} });
|
const gotSettings = await settingsRepo.findOne({ where: {} });
|
||||||
console.log({ gotSettings });
|
console.log(`${App.name}.mount`, { gotSettings });
|
||||||
setAppSettings({
|
setAppSettings({
|
||||||
startup: gotSettings.startup,
|
startup: gotSettings.startup,
|
||||||
theme: gotSettings.theme,
|
theme: gotSettings.theme,
|
||||||
|
|
|
@ -54,7 +54,7 @@ export default function EditExercises() {
|
||||||
.groupBy("name")
|
.groupBy("name")
|
||||||
.getMany()
|
.getMany()
|
||||||
.then((gymSets) => {
|
.then((gymSets) => {
|
||||||
console.log({ gymSets });
|
console.log(`${EditExercises.name}.focus:`, { gymSets });
|
||||||
setOldNames(gymSets.map((set) => set.name).join(", "));
|
setOldNames(gymSets.map((set) => set.name).join(", "));
|
||||||
setOldSteps(gymSets.map((set) => set.steps).join(", "));
|
setOldSteps(gymSets.map((set) => set.steps).join(", "));
|
||||||
setOldMinutes(gymSets.map((set) => set.minutes).join(", "));
|
setOldMinutes(gymSets.map((set) => set.minutes).join(", "));
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default function ExerciseItem({
|
||||||
}, [dark, names, item.name]);
|
}, [dark, names, item.name]);
|
||||||
|
|
||||||
const press = () => {
|
const press = () => {
|
||||||
console.log({ names });
|
console.log(`${ExerciseItem.name}.press:`, { names });
|
||||||
if (names.length === 0)
|
if (names.length === 0)
|
||||||
return navigation.navigate("EditExercise", { gymSet: item });
|
return navigation.navigate("EditExercise", { gymSet: item });
|
||||||
const removing = names.find((name) => name === item.name);
|
const removing = names.find((name) => name === item.name);
|
||||||
|
|
|
@ -72,7 +72,7 @@ export default function SetList() {
|
||||||
);
|
);
|
||||||
|
|
||||||
const next = async () => {
|
const next = async () => {
|
||||||
console.log({ end, refreshing });
|
console.log(`${SetList.name}.next:`, { end, refreshing });
|
||||||
if (end || refreshing) return;
|
if (end || refreshing) return;
|
||||||
const newOffset = offset + LIMIT;
|
const newOffset = offset + LIMIT;
|
||||||
console.log(`${SetList.name}.next:`, { offset, newOffset, term });
|
console.log(`${SetList.name}.next:`, { offset, newOffset, term });
|
||||||
|
|
|
@ -74,7 +74,6 @@ export default function StartPlan() {
|
||||||
where: { name: exercise.name },
|
where: { name: exercise.name },
|
||||||
order: { created: "desc" },
|
order: { created: "desc" },
|
||||||
});
|
});
|
||||||
console.log({ last });
|
|
||||||
if (!last) return;
|
if (!last) return;
|
||||||
delete last.id;
|
delete last.id;
|
||||||
console.log(`${StartPlan.name}.select:`, { last });
|
console.log(`${StartPlan.name}.select:`, { last });
|
||||||
|
@ -129,7 +128,7 @@ export default function StartPlan() {
|
||||||
const canNotify = await check(PERMISSIONS.ANDROID.POST_NOTIFICATIONS);
|
const canNotify = await check(PERMISSIONS.ANDROID.POST_NOTIFICATIONS);
|
||||||
if (canNotify === RESULTS.DENIED)
|
if (canNotify === RESULTS.DENIED)
|
||||||
await request(PERMISSIONS.ANDROID.POST_NOTIFICATIONS);
|
await request(PERMISSIONS.ANDROID.POST_NOTIFICATIONS);
|
||||||
NativeModules.AlarmModule.timer(milliseconds);
|
NativeModules.AlarmModule.timer(milliseconds, `${exercise.name} (${exercise.total + 1}/${best.sets})`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -11,7 +11,6 @@ export default function TimerProgress() {
|
||||||
"tick",
|
"tick",
|
||||||
({ minutes, seconds }: TickEvent) => {
|
({ minutes, seconds }: TickEvent) => {
|
||||||
setProgress((Number(minutes) * 60 + Number(seconds)) / 210);
|
setProgress((Number(minutes) * 60 + Number(seconds)) / 210);
|
||||||
console.log({ minutes, seconds });
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return description.remove;
|
return description.remove;
|
||||||
|
|
|
@ -84,7 +84,7 @@ export default function ViewGraph() {
|
||||||
.getRawMany()
|
.getRawMany()
|
||||||
.then(newWeights => newWeights.map(set => ({ ...set, weight: convertWeight(set.weight, set.unit, unit) })))
|
.then(newWeights => newWeights.map(set => ({ ...set, weight: convertWeight(set.weight, set.unit, unit) })))
|
||||||
.then((newWeights) => {
|
.then((newWeights) => {
|
||||||
console.log({ weights: newWeights });
|
console.log(`${ViewGraph.name}.oneRepMax:`, { weights: newWeights });
|
||||||
setWeights(newWeights);
|
setWeights(newWeights);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ export default function WeightList() {
|
||||||
);
|
);
|
||||||
|
|
||||||
const next = async () => {
|
const next = async () => {
|
||||||
console.log({ end, refreshing });
|
console.log(`${WeightList.name}.next:`, { end, refreshing });
|
||||||
if (end || refreshing) return;
|
if (end || refreshing) return;
|
||||||
const newOffset = offset + LIMIT;
|
const newOffset = offset + LIMIT;
|
||||||
console.log(`${WeightList.name}.next:`, { offset, newOffset, term });
|
console.log(`${WeightList.name}.next:`, { offset, newOffset, term });
|
||||||
|
|
Loading…
Reference in New Issue