bh2smith / dune-sync

GNU General Public License v3.0
2 stars 2 forks source link

Redirect Non-Error Logs to stdout #91

Closed bh2smith closed 4 days ago

bh2smith commented 4 days ago

Closes #89

Taking the advice from the issue and redefining logs. We also add a more detailed log format.

Test Plan

docker-compose up -d
make run

Produces the following logs:

Log Sample ``` 2024-11-25 13:15:08 [INFO] dune_client.api.base:client_async.execute:212 - executing 4238114 on medium cluster 2024-11-25 13:15:08 [INFO] dune_client.api.base:client_async.execute:212 - executing 4273244 on medium cluster 2024-11-25 13:15:09 [INFO] dune-sync:main.main:66 - Job completed: Sync Parameterized Dune Query with Multiple Types to Postgres 2024-11-25 13:15:09 [INFO] dune_client.api.base:client_async._refresh:585 - waiting for query execution 01JDHKYFHN0YMH81B3D1B3RJ1T to complete: ExecutionState.PENDING (queue position: 1) 2024-11-25 13:15:09 [INFO] dune_client.api.base:client_async._refresh:585 - waiting for query execution 01JDHKYFHR198HJ5YD7PZJZDNK to complete: ExecutionState.PENDING (queue position: 2) 2024-11-25 13:15:14 [WARNING] dune-sync:dune._handle_column_types:128 - Unknown column: row(appcode varchar, appdataparams row(appcode varchar, environment varchar), backend row(hooks row(post array(row(calldata varchar, gaslimit varchar, target varchar)), pre array(row(calldata varchar, gaslimit varchar, target varchar)))), environment varchar, fullappdata varchar, metadata row(environment varchar, hooks row(post array(row(calldata varchar, gaslimit varchar, target varchar)), pre array(row(calldata varchar, gaslimit varchar, target varchar)), version varchar), orderclass row(orderclass varchar, version varchar), partnerfee row(bps bigint, recipient varchar), quote row(buyamount varchar, sellamount varchar, slippagebips varchar, version varchar), referrer row(address varchar, kind varchar, referrer varchar, version varchar), utm row(utmcampaign varchar, utmcontent varchar, utmmedium varchar, utmsource varchar, utmterm varchar, version varchar), widget row(appcode varchar, environment varchar)), metadataparams row(orderclassparams row(orderclass varchar), quoteparams row(slippagebips varchar), utmparams row(utmsource varchar)), version varchar) - treating as JSONB 2024-11-25 13:15:14 [INFO] dune-sync:postgres.save:91 - Data saved to app_data successfully! 2024-11-25 13:15:14 [INFO] dune-sync:main.main:66 - Job completed: Table Independent Query to Dune 2024-11-25 13:15:14 [WARNING] dune-sync:dune._handle_column_types:128 - Unknown column: array(row(address varbinary, storagekeys array(varbinary))) - treating as JSONB 2024-11-25 13:15:15 [INFO] dune-sync:postgres.save:91 - Data saved to results_4238114 successfully! 2024-11-25 13:15:15 [INFO] dune-sync:main.main:66 - Job completed: Sync Parameterized Dune Query with Multiple Types to Postgres ```