Skip to content

Commit

Permalink
chore(cu): improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed Nov 7, 2023
1 parent b1927c7 commit 050f140
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions servers/cu/src/domain/lib/loadProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ function loadLatestEvaluationWith ({ findLatestEvaluation, logger }) {
return (ctx) => of(ctx)
.chain(args => findLatestEvaluation({ processId: args.id, to: args.to })) // 'to' could be undefined
.bimap(
logger.tap('Could not find latest evaluation in db. Using intial process as state'),
logger.tap('found evaluation in db %j. Using as state and starting point to load messages')
(_) => {
logger('Could not find latest evaluation in db. Using intial process as state...')
return _
},
logger.tap('Found previous evaluation in db %j. Using as state and starting point to load messages')
)
.bichain(
/**
Expand Down
2 changes: 1 addition & 1 deletion servers/cu/src/domain/readState.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function readStateWith (env) {
.map((ctx) => ctx.output)
.map(
env.logger.tap(
'readState result for process "%s" to interaction "%s": %O',
'readState result for process "%s" up to message "%s": %o',
processId,
to || 'latest'
)
Expand Down

0 comments on commit 050f140

Please sign in to comment.