You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to local execution of functions on Aztec, you can only see these logs when running private functions or simulating public functions.
49
+
:::note
50
+
Debug logs appear only during local execution. Private functions always execute locally, but public functions must be simulated to show logs. Use `.simulate()` or `.prove()` in TypeScript, or `env.simulate_public_function()` in TXE tests.
51
+
:::
50
52
51
-
Enable logs on the wallet. For example, if your contract uses `TestWallet`:
53
+
To see debug logs from your tests, set `LOG_LEVEL` when running:
52
54
53
-
```js
54
-
awaitTestWallet.create(node)
55
+
```bash
56
+
LOG_LEVEL="debug" yarn run test
55
57
```
56
58
57
-
Set the `LOG_LEVEL` on whatever is running it:
59
+
To filter specific modules, use a semicolon-delimited list:
58
60
59
61
```bash
60
-
LOG_LEVEL="debug" yarn run test
62
+
LOG_LEVEL="info;debug:simulator:client_execution_context;debug:simulator:client_view_context" yarn run test
61
63
```
62
64
63
-
This prints your `debug_logs` together with your application logs. You can further narrow it down by showing only the `execution` and `view` logs:
65
+
:::info Log filter format
66
+
`LOG_LEVEL` accepts a semicolon-delimited list of filters. Each filter can be:
67
+
68
+
-`level` - Sets default level for all modules
69
+
-`level:module` - Sets level for a specific module
70
+
-`level:module:submodule` - Sets level for a specific submodule
64
71
65
72
```bash
66
-
LOG_LEVEL="info;debug:simulator:client_execution_context;debug:simulator:client_view_context" yarn run test
Debug logs appear only during local execution. Private functions always execute locally, but public functions must be simulated to show logs. Use `.simulate()` or `.prove()` in TypeScript, or `env.simulate_public_function()` in TXE tests.
51
+
:::
52
+
53
+
To see debug logs from your tests, set `LOG_LEVEL` when running:
0 commit comments