doc: update debuglog examples to use 'foo-bar' instead of 'foo'

PR-URL: https://github.com/nodejs/node/pull/60867
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
xiaoyao
2025-11-29 10:18:49 +08:00
committed by GitHub
parent 3c92ee1008
commit 7643c2a076

View File

@@ -135,14 +135,14 @@ The `section` supports wildcard also:
```mjs
import { debuglog } from 'node:util';
const log = debuglog('foo');
const log = debuglog('foo-bar');
log('hi there, it\'s foo-bar [%d]', 2333);
```
```cjs
const { debuglog } = require('node:util');
const log = debuglog('foo');
const log = debuglog('foo-bar');
log('hi there, it\'s foo-bar [%d]', 2333);
```