Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--log-level ignored by C-chain logging #869

Closed
mataebi opened this issue Jun 6, 2021 · 1 comment
Closed

--log-level ignored by C-chain logging #869

mataebi opened this issue Jun 6, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mataebi
Copy link

mataebi commented Jun 6, 2021

Describe the bug
It seems that the --log-level setting is not observed by reporting activity on the C chain while on P and X chain this seems to work as expected. This produces huge amounts of unwanted log output wasting resources and slowing down the service unnecessarily.

To Reproduce
Run avalanchego ... --log-level=Info ... or any other setting for the log level. In the log files you will see INFO messages and above for P and X chain as expected:

==> P/0.log <==
INFO [06-06|17:48:56] <P Chain> avalanchego/vms/platformvm/vm.go#200: initializing last accepted block as 2gnCjpDPMxbZTHXtFtsDmMC7HGNyMTKwntJpiJJ4YtWdfZRCnu
INFO [06-06|17:48:56] <P Chain> avalanchego/snow/engine/snowman/transitive.go#64: initializing consensus engine
INFO [06-06|17:48:56] <P Chain> avalanchego/snow/engine/common/bootstrapper.go#71: Starting bootstrap...
INFO [06-06|17:49:00] <P Chain> avalanchego/snow/engine/common/bootstrapper.go#300: Bootstrapping started syncing with 1 vertices in the accepted frontier
...

==> X/0.log <==
INFO [06-06|17:49:01] <X Chain> avalanchego/snow/engine/avalanche/transitive.go#72: initializing consensus engine
INFO [06-06|17:49:01] <X Chain> avalanchego/snow/engine/common/bootstrapper.go#71: Starting bootstrap...
INFO [06-06|17:49:05] <X Chain> avalanchego/snow/engine/common/bootstrapper.go#300: Bootstrapping started syncing with 1 vertices in the accepted frontier
INFO [06-06|17:49:07] <X Chain> avalanchego/snow/engine/avalanche/bootstrap/bootstrapper.go#428: bootstrapping fetched 2 vertices. Executing transaction state transitions...

However, the C chain log shows all log levels including DEBUG messages independent of the setting of --log-level:

==> C/0.log <==
INFO [06-06|17:55:14.031] Imported new chain segment               blocks=1 txs=1 mgas=0.021 elapsed=2.987ms   mgasps=7.030   number=2233751 hash="1d7626…01ca44" dirty=0.00B
DEBUG[06-06|17:55:14.031] Reinjecting stale transactions           count=0
DEBUG[06-06|17:55:14.729] Accepting block 1d7626fd76f92d521cb63a58423c5e875d45eba2c319dca3d0e68b497b01ca44 (DyZD3c1FUhBuJkWk5UmSjFc2f1ZcqknFAFR9waKbKXVKfFJCV) at height 2233751 
DEBUG[06-06|17:55:28.825] crosschain X->C                          addr=0xB2224440da81c3D64f5Bb00E007ACd6AD5c1D05a amount=627360000      assetID=AVAX
DEBUG[06-06|17:55:28.876] crosschain X->C                          addr=0xB2224440da81c3D64f5Bb00E007ACd6AD5c1D05a amount=627360000      assetID=AVAX
DEBUG[06-06|17:55:28.878] Persisted trie from memory database      nodes=6   size=2.45KiB  time="596.748µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=-7462.00B
...

Expected behavior
The C chain log should show messages observing log-level as the other two chain logs do.

Operating System
Linux version 4.19.0-16-amd64 ([email protected]) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.181-1 (2021-03-19)

Additional context
Observed in 1.4.7 (but was most likely there before)

By submitting this issue I agree to the Terms and Conditions of the Developer Accelerator Program.

@mataebi mataebi added the bug Something isn't working label Jun 6, 2021
@ceyonur
Copy link
Contributor

ceyonur commented Oct 13, 2021

This was fixed with an external C-chain config: log-level

Release notes: https://docs.avax.network/build/release-notes/avalanchego#v1.5.3-view-on-github

Also see C-chain configs in: https://docs.avax.network/build/references/command-line-interface#c-chain-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants