Skip to content

Removed aquarius debug logs.#322

Merged
alexcos20 merged 6 commits intomainfrom
remove-debug-logs-from-aqua
Sep 23, 2022
Merged

Removed aquarius debug logs.#322
alexcos20 merged 6 commits intomainfrom
remove-debug-logs-from-aqua

Conversation

@mariacarmina
Copy link
Copy Markdown
Contributor

Description

Removed Aquarius debug logs. Set env var to establish log level

Is this PR related with an open issue?

Related to Issue #314

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@mariacarmina
Copy link
Copy Markdown
Contributor Author

Output:

aquarius_1         | default log level: 20, env var LOG_LEVEL INFO
aquarius_1         | default log level: 20, env var LOG_LEVEL INFO
aquarius_1         | default log level: 20, env var LOG_LEVEL INFO
aquarius_1         | default log level: 20, env var LOG_LEVEL INFO
aquarius_1         | default log level: 20, env var LOG_LEVEL INFO
aquarius_1         | default log level: 20, env var LOG_LEVEL INFO
aquarius_1         | 2022-09-20 18:59:41,195 - aquarius.events.events_monitor - INFO - Added 8996 to chains list
aquarius_1         | 2022-09-20 18:59:41 26fe708664e0 root[25] INFO Stable connection to ES.
aquarius_1         | 2022-09-20 18:59:41,269 - aquarius.events.events_monitor - INFO - PURGATORY: Enabling purgatory
aquarius_1         | 2022-09-20 18:59:41,269 - aquarius.events.events_monitor - INFO - Starting the events monitor.
aquarius_1         | 2022-09-20 18:59:41 26fe708664e0 __main__[25] INFO EventsMonitor: started
aquarius_1         | 2022-09-20 18:59:41 26fe708664e0 root[25] INFO Stable connection to ES.

When I start barge with aquarius, there are only INFO logging messages.

ipfs: '172.15.0.16:5001'
ethereum: 'development:${NETWORK_RPC_URL}'
RUST_LOG: info
RUST_LOG: ${RUST_LOG}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we name it SUBGRAPH_LOG_LEVEL ?

start_ocean.sh Outdated
printf $COLOR_Y'Starting without IPFS...\n\n'$COLOR_RESET
;;
--with-thegraph)
export RUST_LOG=${RUST_LOG:-INFO}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this above, where all other _LOG_LEVELS statements are located ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I declared the log levels for each component and where they were separated with #. Should I define the log levels at the top of the script?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, have a section with all envs related to logging. maybe around line 43 in start_ocean.sh

ipfs: '172.15.0.16:5001'
ethereum: 'development:${NETWORK_RPC_URL}'
RUST_LOG: info
SUBGRAPH_LOG_LEVEL: ${SUBGRAPH_LOG_LEVEL}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SUBGRAPH_LOG_LEVEL: ${SUBGRAPH_LOG_LEVEL}
RUST_LOG: ${SUBGRAPH_LOG_LEVEL}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because graph_node has no idea what SUBGRAPH_LOG_LEVEL is :)

start_ocean.sh Outdated
# Export LOG LEVEL
export AQUARIUS_LOG_LEVEL=${AQUARIUS_LOG_LEVEL:-INFO}
export PROVIDER_LOG_LEVEL=${PROVIDER_LOG_LEVEL:-INFO}
export SUBGRAPH_LOG_LEVEL=${SUBGRAPH_LOG_LEVEL:-INFO}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export SUBGRAPH_LOG_LEVEL=${SUBGRAPH_LOG_LEVEL:-INFO}
export SUBGRAPH_LOG_LEVEL=${SUBGRAPH_LOG_LEVEL:-info}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if graph_node debug level is case sensitive or not, so better keep what we had

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok sure, it was previously with lowercase, I will keep as it was.

@alexcos20
Copy link
Copy Markdown
Member

Can you also update the README, to reflect the changes?

@alexcos20 alexcos20 merged commit d455c6d into main Sep 23, 2022
@alexcos20 alexcos20 deleted the remove-debug-logs-from-aqua branch September 23, 2022 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants