forked from romanz/electrs
-
Notifications
You must be signed in to change notification settings - Fork 166
feat(logging): default to info-level logging #207
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
Open
EddieHouston
wants to merge
2
commits into
Blockstream:new-index
Choose a base branch
from
EddieHouston:startup-logging
base: new-index
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,11 +72,11 @@ impl Store { | |
|
|
||
| let txstore_db = DB::open(&path.join("txstore"), config, verify_compat, &shared_cache); | ||
| let added_blockhashes = load_blockhashes(&txstore_db, &BlockRow::done_filter()); | ||
| debug!("{} blocks were added", added_blockhashes.len()); | ||
| info!("{} blocks were added", added_blockhashes.len()); | ||
|
|
||
| let history_db = DB::open(&path.join("history"), config, verify_compat, &shared_cache); | ||
| let indexed_blockhashes = load_blockhashes(&history_db, &BlockRow::done_filter()); | ||
| debug!("{} blocks were indexed", indexed_blockhashes.len()); | ||
| info!("{} blocks were indexed", indexed_blockhashes.len()); | ||
|
|
||
| let cache_db = DB::open(&path.join("cache"), config, verify_compat, &shared_cache); | ||
|
|
||
|
|
@@ -101,7 +101,7 @@ impl Store { | |
| .expect("invalid header chain") | ||
| .prev_blockhash; | ||
| } | ||
| debug!( | ||
| info!( | ||
| "{} headers were loaded, tip at {:?}", | ||
| headers_map.len(), | ||
| tip_hash | ||
|
|
@@ -429,27 +429,27 @@ impl Indexer { | |
|
|
||
| if let DBFlush::Disable = self.flush { | ||
| let t = std::time::Instant::now(); | ||
| debug!("flushing txstore_db to disk"); | ||
| info!("flushing txstore_db to disk"); | ||
| self.store.txstore_db.flush(); | ||
| debug!("flushing txstore_db complete in {:.1?}", t.elapsed()); | ||
| info!("flushing txstore_db complete in {:.1?}", t.elapsed()); | ||
|
|
||
| let t = std::time::Instant::now(); | ||
| debug!("flushing history_db to disk"); | ||
| info!("flushing history_db to disk"); | ||
| self.store.history_db.flush(); | ||
| debug!("flushing history_db complete in {:.1?}", t.elapsed()); | ||
| info!("flushing history_db complete in {:.1?}", t.elapsed()); | ||
|
|
||
| // cache_db receives WAL-disabled writes when --address-search is enabled, | ||
| // so it needs the same explicit flush to ensure durability. | ||
| let t = std::time::Instant::now(); | ||
| debug!("flushing cache_db to disk"); | ||
| info!("flushing cache_db to disk"); | ||
| self.store.cache_db.flush(); | ||
| debug!("flushing cache_db complete in {:.1?}", t.elapsed()); | ||
| info!("flushing cache_db complete in {:.1?}", t.elapsed()); | ||
|
|
||
| self.flush = DBFlush::Enable; | ||
| } | ||
|
|
||
| // Update the synced tip after all db writes are flushed | ||
| debug!("updating synced tip to {:?}", tip); | ||
| info!("updating synced tip to {:?}", tip); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should leave this as debug and put a new info log above in the flush section so we dont get continuous logging of tip by default. |
||
| self.store.txstore_db.put_sync(b"t", &serialize(&tip)); | ||
|
|
||
| // Finally, append the new headers to the in-memory HeaderList. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.