@@ -3,6 +3,7 @@ import fs from 'fs'
33import type { GetServerSidePropsContext } from 'next'
44
55import { readCompressedJsonFileFallback } from '@/frame/lib/read-json-file'
6+ import { createLogger } from '@/observability/logger'
67import { getOpenApiVersion } from '@/versions/lib/all-versions'
78import { categoriesWithoutSubcategories } from '../../rest/lib/index'
89import type { Context , ExtendedRequest } from '@/types'
@@ -15,7 +16,7 @@ interface AppsConfig {
1516// are expected to provide the concrete shape via the generic parameter.
1617type AppsData = Record < string , unknown >
1718
18- const DEBUG = process . env . RUNNER_DEBUG === '1' || process . env . DEBUG === '1'
19+ const logger = createLogger ( import . meta . url )
1920const ENABLED_APPS_DIR = 'src/github-apps/data'
2021const githubAppsData = new Map < string , Map < string , AppsData > > ( )
2122
@@ -33,11 +34,7 @@ export async function getAppsData<T extends AppsData = AppsData>(
3334 docsVersion : string ,
3435 apiVersion ?: string ,
3536) : Promise < T > {
36- if ( DEBUG ) {
37- console . log (
38- `[DEBUG] getAppsData: ROOT=${ process . env . ROOT || '(not set)' } , path=${ ENABLED_APPS_DIR } ` ,
39- )
40- }
37+ logger . debug ( 'getAppsData' , { root : process . env . ROOT || '(not set)' , path : ENABLED_APPS_DIR } )
4138
4239 const pageTypeMap = githubAppsData . get ( pageType ) !
4340 const filename = `${ pageType } .json`
0 commit comments