Skip to content

Commit

Permalink
Have Effect write to the same logger
Browse files Browse the repository at this point in the history
Refs #1834
  • Loading branch information
thewilkybarkid committed Sep 20, 2024
1 parent 3286aa5 commit c2e33ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion integration/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '@playwright/test'
import { SystemClock } from 'clock-ts'
import { Doi } from 'doi-ts'
import { ConfigProvider, Effect, Fiber, Layer, pipe } from 'effect'
import { ConfigProvider, Effect, Logger as EffectLogger, Fiber, Layer, pipe } from 'effect'
import fetchMock from 'fetch-mock'
import * as fs from 'fs/promises'
import http from 'http'
Expand All @@ -34,6 +34,7 @@ import type { ConfigEnv } from '../src/app.js'
import { AuthorInviteC } from '../src/author-invite.js'
import { ContactEmailAddressC } from '../src/contact-email-address.js'
import { DeprecatedLoggerEnv, ExpressConfig } from '../src/Context.js'
import { DeprecatedLogger } from '../src/DeprecatedServices.js'
import { createAuthorInviteEmail } from '../src/email.js'
import {
type CanConnectOrcidProfileEnv,
Expand Down Expand Up @@ -1288,6 +1289,7 @@ const appFixtures: Fixtures<AppFixtures, Record<never, never>, PlaywrightTestArg
} as unknown as typeof ExpressConfig.Service),
Effect.provideService(CanWriteFeedback, canWriteFeedback),
Effect.provideService(FetchHttpClient.Fetch, fetch as unknown as typeof globalThis.fetch),
Effect.provide(EffectLogger.replaceEffect(EffectLogger.defaultLogger, DeprecatedLogger)),
Effect.provideService(DeprecatedLoggerEnv, { clock: SystemClock, logger }),
Effect.provide(
Layer.setConfigProvider(
Expand Down

0 comments on commit c2e33ca

Please sign in to comment.