Official documentation can be found here.
npm install pino-gcp-logger
import { createLogger, logLevel } from 'pino-gcp-logger';
const defaultLevel: logLevel = 'info';
const isGCP = true;
const logger = createLogger(defaultLevel, isGCP);
logger.info('Hello world', { extra: 'data' });