Enhance logging in BaseWorker and DirectorWorker: Added detailed debug logs before database calls in change_falukant_user_money, improving traceability of user ID and money change values during production start and sell operations.
This commit is contained in:
@@ -682,6 +682,12 @@ impl DirectorWorker {
|
||||
);
|
||||
}
|
||||
|
||||
// Debug: Log vor dem DB-Aufruf
|
||||
eprintln!(
|
||||
"[DirectorWorker] calling change_falukant_user_money for start production: user_id={}, money_change={}",
|
||||
plan.falukant_user_id, -production_cost
|
||||
);
|
||||
|
||||
conn.prepare("insert_production", QUERY_INSERT_PRODUCTION)?;
|
||||
|
||||
// Eine einzelne Produktion mit max. 100 Stück anlegen
|
||||
@@ -1005,6 +1011,12 @@ impl DirectorWorker {
|
||||
);
|
||||
}
|
||||
|
||||
// Debug: Log vor dem DB-Aufruf
|
||||
eprintln!(
|
||||
"[DirectorWorker] calling change_falukant_user_money for sell products: user_id={}, money_change={}, product_id={}",
|
||||
item.user_id, sell_price, item.product_id
|
||||
);
|
||||
|
||||
conn.execute(
|
||||
"add_sell_log",
|
||||
&[
|
||||
|
||||
Reference in New Issue
Block a user