Skip to content

Commit

Permalink
ingest: Properly parse and emit debug-level tags from Captive Core. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic authored Jul 7, 2021
1 parent cf92a15 commit 1ee7c27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ingest/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ All notable changes to this project will be documented in this file. This projec
### New Features
* **Performance improvement**: the Captive Core backend now reuses bucket files whenever it finds existing ones in the corresponding `--captive-core-storage-path` (introduced in [v2.0](#v2.0.0)) rather than generating a one-time temporary sub-directory ([#3670](https://github.com/stellar/go/pull/3670)). Note that taking advantage of this feature requires [Stellar-Core v17.1.0](https://github.com/stellar/stellar-core/releases/tag/v17.1.0) or later.

### Bug Fixes
* The Stellar Core runner now parses logs from its underlying subprocess better [#3746](https://github.com/stellar/go/pull/3746).


## v2.0.0

Expand Down
9 changes: 5 additions & 4 deletions ingest/ledgerbackend/stellar_core_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,14 @@ func (r *stellarCoreRunner) getLogLineWriter() io.Writer {
"ERROR": r.log.Errorf,
"WARNING": r.log.Warnf,
"INFO": r.log.Infof,
"DEBUG": r.log.Debugf,
}

if writer, ok := levelMapping[strings.ToUpper(level)]; ok {
writer("%s: %s", category, line)
} else {
r.log.Info(line)
writer := r.log.Infof
if f, ok := levelMapping[strings.ToUpper(level)]; ok {
writer = f
}
writer("%s: %s", category, line)
} else {
r.log.Info(line)
}
Expand Down

0 comments on commit 1ee7c27

Please sign in to comment.