Issue with Effect.log* not appearing in logs despite code executing okay
I'm finding that
Effect.log*Effect.log* I'm using in places aren't appearing in my logs despite the code seeming to execute ok. It's fine to mix pipepipe and gengen right?const calcTest = Command.make(
'test',
{ pathspec, verbose },
({ pathspec, verbose }) => {
const pyeff = Effect.tryPromise(() =>
loadPyodide({ indexURL: 'node_modules/pyodide' }),
)
return Effect.flatMap(pyeff, (pyodide) => {
return Effect.flatMap(calcs, (parentConfig) => {
...
const calcId = HashMap.unsafeGet(configs, 'calculationId')
const revisionId = 'test'
const name = HashMap.unsafeGet(configs, 'name')
const newFormula = '=' + HashMap.unsafeGet(configs, 'formula')
const services = buildServices(pyodide)
return Effect.logInfo(
'hi',
//`Running 'calcs test${paths}' with '--verbose ${verbose} and configs: ${configs}'`,
).pipe(
() =>
updateCalculation(services)(calcId, revisionId, name, newFormula),
Logger.withMinimumLogLevel(LogLevel.Debug),
)
})
})
},
)
export class LoadCalculationBasic implements LoadCalculation {
constructor(public readonly store: CalculationStore) {}
fromRevisionId = (
calculationId: string,
revisionId: string,
): Eff<CalculationResultNotFoundError> => {
return Effect.logDebug('LoadCalculationBasic.fromRevisionId').pipe(() =>
this.store.getCalculationResultAtRevision(calculationId, revisionId),
)
}
}const calcTest = Command.make(
'test',
{ pathspec, verbose },
({ pathspec, verbose }) => {
const pyeff = Effect.tryPromise(() =>
loadPyodide({ indexURL: 'node_modules/pyodide' }),
)
return Effect.flatMap(pyeff, (pyodide) => {
return Effect.flatMap(calcs, (parentConfig) => {
...
const calcId = HashMap.unsafeGet(configs, 'calculationId')
const revisionId = 'test'
const name = HashMap.unsafeGet(configs, 'name')
const newFormula = '=' + HashMap.unsafeGet(configs, 'formula')
const services = buildServices(pyodide)
return Effect.logInfo(
'hi',
//`Running 'calcs test${paths}' with '--verbose ${verbose} and configs: ${configs}'`,
).pipe(
() =>
updateCalculation(services)(calcId, revisionId, name, newFormula),
Logger.withMinimumLogLevel(LogLevel.Debug),
)
})
})
},
)
export class LoadCalculationBasic implements LoadCalculation {
constructor(public readonly store: CalculationStore) {}
fromRevisionId = (
calculationId: string,
revisionId: string,
): Eff<CalculationResultNotFoundError> => {
return Effect.logDebug('LoadCalculationBasic.fromRevisionId').pipe(() =>
this.store.getCalculationResultAtRevision(calculationId, revisionId),
)
}
}