import { Client } from '@elastic/elasticsearch' ; import { createLogger , LogLevel } from '../../lib/utils/create_logger' ; export function getCommonServices ( { target , logLevel } ) { const client = new Client ( { node : target , } ) ; const logger = createLogger ( logLevel ) ; return { logger , client , } ; } export type RunServices = ReturnType < typeof getCommonServices > ;