Skip to content

fix(core): respect log level in worker threads - #1058

Merged
bmuenzenmeyer merged 2 commits into
nodejs:mainfrom
zeexzeex:fix/worker-log-level
Sep 21, 2026
Merged

bmuenzenmeyer merged 2 commits into
nodejs:mainfrom
zeexzeex:fix/worker-log-level

Conversation

@zeexzeex

Copy link
Copy Markdown
Contributor

What

--log-level had no effect on warnings coming from worker threads.

npx @doc-kit/cli generate -t web -o out -i <node>/doc/api/ --log-level fatal

printed 81 WARN lines instead of none.

Why

The level is applied on the main thread only. Worker threads load their own module graph, so the default logger export creates a separate instance there that keeps the default info level. The warnings in the report come from resolveTypes.mjs, which runs inside the workers.

The same input makes it clear:

Input Workers used default level --log-level fatal
single file no 6 WARN 0 WARN
directory (doc/api/) yes 81 WARN 81 WARN

Both inputs produce warnings, but only the single file respects the requested level. parallel.mjs skips the pool when threads <= 1 || items.length <= 2, so running the directory with --threads 1 silences the warnings as well.

How

The level is passed through Piscina workerData and applied at the worker entry point. This adds a small getLogLevel() accessor, as there was no way to read the configured level back.

I also considered putting the level into configuration, which already reaches the workers, but createTask deliberately narrows what it sends:

// Only pass the needed configuration to this generator
configuration: {
  [generatorName]: configuration[generatorName],
},

Sending the level that way would repeat it for every chunk, while workerData is sent once per worker.

Verification

Case Before After
--log-level fatal 81 WARN 0 WARN
default level 81 WARN 81 WARN

The default level is unchanged, so nothing is silenced that should not be. Full suite passes (560 tests), lint and format checks are clean.

Fixes: #1032

The log level set by `--log-level` was only applied on the main thread.
Worker threads load their own module graph, so the default logger export
creates a separate instance there that keeps the default `info` level.
Warnings emitted from inside workers were therefore printed regardless of
the requested level.

Pass the level through Piscina `workerData` and apply it at the worker
entry point. This adds a `getLogLevel()` accessor, as there was no way to
read the configured level back.

Fixes: nodejs#1032
Signed-off-by: Avocado <ujubongbong@gmail.com>
@zeexzeex
zeexzeex requested a review from a team as a code owner August 27, 2026 07:07
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Aug 27, 2026 7:49am

Request Review

@AugustinMauroy

Copy link
Copy Markdown
Member

could you add some test

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.77%. Comparing base (18b9423) to head (59cba19).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1058      +/-   ##
==========================================
+ Coverage   89.67%   90.77%   +1.10%     
==========================================
  Files         205      221      +16     
  Lines       19208    21267    +2059     
  Branches     1795     2003     +208     
==========================================
+ Hits        17224    19305    +2081     
+ Misses       1976     1956      -20     
+ Partials        8        6       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

api-links Generator

Output: 1 file differs

apilinks.json
Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines

  {
    'Agent.defaultMaxSockets': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L300',
    'Buffer.alloc': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L450',
    'Buffer.allocUnsafe': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L469',
    'Buffer.allocUnsafeSlow': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L492',
...
    'agent.addRequest': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L365',
+   'agent.createConnection': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L304',
-   'agent.createConnection': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L332',
    'agent.createSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L446',
    'agent.destroy': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L679',
+   'agent.getName': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L334',
+   'agent.keepSocketAlive': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L635',
-   'agent.getName': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L515',
-   'agent.keepSocketAlive': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L484',
    'agent.removeSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L574',
    'agent.reuseSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L671',
    'assert.assert': 'https://github.com/{repository}/blob/HEAD/lib/assert.js#L185',
    'asyncResource.asyncId': 'https://github.com/{repository}/blob/HEAD/lib/async_hooks.js#L243',
    'asyncResource.bind': 'https://github.com/{repository}/blob/HEAD/lib/async_hooks.js#L275',
...
    'server.address': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2703',
+   'server.close': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L681',
+   'server.closeAllConnections': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L691',
+   'server.closeIdleConnections': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L703',
-   'server.close': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2836',
-   'server.closeAllConnections': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L124',
-   'server.closeIdleConnections': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L126',
    'server.getConnections': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2798',
    'server.listen': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2500',
    'server.ref': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2949',
+   'server.setTimeout': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L719',
-   'server.setTimeout': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L128',
    'server.unref': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2958',
+   'server[SymbolAsyncDispose]': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L687',
-   'server[SymbolAsyncDispose]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2876',
    'server[SymbolAsyncIterator]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2883',
    'server[kDeserialize]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2423',
    'server[kTransferList]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2396',
    'server[kTransfer]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2401',
+   'server[undefined]': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L726',
-   'server[undefined]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2913',
    'serverresponse._finish': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L254',
    'serverresponse._implicitHeader': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L411',
    'serverresponse.assignSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L304',
    'serverresponse.detachSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L315',
    'serverresponse.statusCode': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L277',

Performance estimate (single CI run)

  • Generation time: 19.5% faster (1.28 s → 1.03 s)
  • Peak memory: 21.8% higher (351.06 MB → 427.51 MB)

legacy-html Generator

Output size: 1 file changed · net +86.00 B

File size details
File Main PR Change
assets/style.css 18.10 KB 18.18 KB +86.00 B (+0.5%)

Performance estimate (single CI run)

  • Generation time: 142.1% slower (17.28 s → 41.84 s)
  • Peak memory: 4.5% lower (2.38 GB → 2.28 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 32.6% slower (7.28 s → 9.65 s)
  • Peak memory: 19.2% lower (1.79 GB → 1.45 GB)

llms-txt Generator

Performance estimate (single CI run)

  • Generation time: 11.1% faster (9.64 s → 8.57 s)
  • Peak memory: 10.1% lower (1.74 GB → 1.57 GB)

orama-db Generator

Output size: 1 file changed · net +1.00 B

File size details
File Main PR Change
orama-db.json 9.18 MB 9.18 MB +1.00 B (+0.0%)

Performance estimate (single CI run)

  • Generation time: 11.2% slower (8.32 s → 9.25 s)
  • Peak memory: 10.2% lower (1.80 GB → 1.62 GB)

web Generator

Output size: 208 files changed · net -178.72 KB

File size details
File Main PR Change
assets/style-CGabmPaa.css 137.13 KB +137.13 KB
assets/style-DSrWCPe1.css 136.96 KB -136.96 KB (-100.0%)
assets/SearchBox-BN8iI9YL.js 84.77 KB -84.77 KB (-100.0%)
assets/SearchBox-BlNcg3Nb.js 84.60 KB +84.60 KB
assets/dist-BzvyWr8H.js 30.43 KB -30.43 KB (-100.0%)
assets/dist-SLacX1V5.js 30.42 KB +30.42 KB
assets/SideBar-D3J2RxXA.js 25.64 KB +25.64 KB
assets/SideBar-CdIbxaTX.js 25.34 KB -25.34 KB (-100.0%)
assets/config-BjJOSXt8.js 23.77 KB +23.77 KB
assets/client-CLFBsU_-.js 21.59 KB +21.59 KB
assets/runtime-BD7qj2tq.js 19.73 KB -19.73 KB (-100.0%)
assets/Combination-0fkzM7Xi.js 16.13 KB -16.13 KB (-100.0%)
assets/Combination-DCh-2Wd9.js 16.12 KB +16.12 KB
assets/config-Br874TPe.js 16.05 KB -16.05 KB (-100.0%)
assets/ThemeToggle-CYj-nLIH.js 13.64 KB +13.64 KB
assets/ThemeToggle-DujZkxHJ.js 13.63 KB -13.63 KB (-100.0%)
assets/dist-DCAUEzJ7.js 10.20 KB -10.20 KB (-100.0%)
assets/dist-CFZ599j-.js 10.20 KB +10.20 KB
assets/compat-By8EDDlP.js 10.13 KB -10.13 KB (-100.0%)
assets/Layout-BZEKNkG0.js 10.13 KB +10.13 KB
assets/compat-CuYKHQwR.js 10.12 KB +10.12 KB
assets/Layout-NJb3E3tg.js 9.64 KB -9.64 KB (-100.0%)
assets/Tooltip-7hJjyriz.js 7.93 KB -7.93 KB (-100.0%)
assets/Tooltip-D5zA1UrF.js 7.93 KB +7.93 KB
assets/dist-D_cBIp_y.js 6.99 KB +6.99 KB
assets/dist-63k7rj6h.js 6.99 KB -6.99 KB (-100.0%)
assets/jsx-runtime-BTmZ7Dnv.js 5.67 KB -5.67 KB (-100.0%)
assets/jsx-runtime-DKWyYgz3.js 5.67 KB +5.67 KB
assets/dist-CjM9bYyR.js 3.94 KB -3.94 KB (-100.0%)
assets/dist-PWsK0bHZ.js 3.94 KB +3.94 KB
assets/CodeTabs-BfbTM52e.js 3.89 KB +3.89 KB
assets/CodeTabs-CGNWQZnN.js 3.88 KB -3.88 KB (-100.0%)
assets/CodeBox-BVv6UTaj.js 3.44 KB +3.44 KB
assets/CodeBox-DnqMHzBD.js 3.44 KB -3.44 KB (-100.0%)
assets/hooks.module-Z9uALkdf.js 3.40 KB +3.40 KB
assets/hooks.module-D1vHlN8p.js 3.37 KB -3.37 KB (-100.0%)
assets/404-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/addons-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/all-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/assert-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/async_context-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/async_hooks-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/buffer-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/child_process-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/cli-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/cluster-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/console-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/crypto-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/debugger-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/deprecations-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/dgram-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/diagnostics_channel-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/dns-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/documentation-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/domain-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/dtls-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/embedding-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/environment_variables-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/errors-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/esm-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/events-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/ffi-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/fs-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/globals-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/http-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/http2-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/https-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/index-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/inspector-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/intl-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/module-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/modules-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/n-api-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/net-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/os-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/packages-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/path-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/perf_hooks-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/permissions-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/process-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/punycode-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/querystring-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/quic-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/readline-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/repl-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/report-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/single-executable-applications-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/sqlite-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/stream-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/stream_iter-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/string_decoder-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/test-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/timers-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/tls-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/tracing-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/tty-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/typescript-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/url-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/util-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/v8-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/vfs-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/vm-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/wasi-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/webcrypto-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/webstreams-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/worker_threads-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/zlib-DHxcwOQL.js 2.59 KB -2.59 KB (-100.0%)
assets/FunctionSignature-B58lYeSo.js 2.28 KB -2.28 KB (-100.0%)
assets/FunctionSignature-_srgqV4g.js 2.28 KB +2.28 KB
assets/Banner-CDccNUhv.js 2.19 KB -2.19 KB (-100.0%)
assets/Banner-Big988O-.js 2.19 KB +2.19 KB
assets/ChangeHistory-ygI-N5hZ.js 1.77 KB +1.77 KB
assets/ChangeHistory-B0WaJXka.js 1.75 KB -1.75 KB (-100.0%)
assets/DataTag-cEVbSfU1.js 844.00 B -844.00 B (-100.0%)
assets/DataTag-DusaeaoP.js 844.00 B +844.00 B
assets/DocumentationIndex-CFaUJqwy.js 833.00 B +833.00 B
assets/DocumentationIndex-CeR31Hxu.js 826.00 B -826.00 B (-100.0%)
assets/classnames-D3NAiCW9.js 755.00 B -755.00 B (-100.0%)
assets/classnames-CWgwbItc.js 755.00 B +755.00 B
assets/rolldown-runtime-hePW80VL.js 716.00 B +716.00 B
assets/rolldown-runtime-QTnfLwEv.js 694.00 B -694.00 B (-100.0%)
assets/ArrowUpRightIcon-klipxc14.js 619.00 B -619.00 B (-100.0%)
assets/ArrowUpRightIcon-BIustzky.js 618.00 B +618.00 B
assets/Badge-e-XbktRt.js 607.00 B -607.00 B (-100.0%)
assets/Badge-D8qWNSVV.js 607.00 B +607.00 B
assets/AlertBox-Bt0o-59G.js 591.00 B -591.00 B (-100.0%)
assets/AlertBox-Eo84P2cc.js 591.00 B +591.00 B
assets/CodeBracketIcon-5MFlLNXh.js 513.00 B -513.00 B (-100.0%)
assets/CodeBracketIcon-Rt8GfSve.js 512.00 B +512.00 B
assets/dist-CITiOpto.js 477.00 B -477.00 B (-100.0%)
assets/dist-DfjYKLQa.js 477.00 B +477.00 B
assets/ChevronDownIcon-CfD7J2jV.js 469.00 B -469.00 B (-100.0%)
assets/ChevronDownIcon-BNTYzSor.js 468.00 B +468.00 B
all.html 32.02 MB 32.02 MB -344.00 B (-0.0%)
assets/Blockquote-B9hUUXCK.js 167.00 B -167.00 B (-100.0%)
assets/Blockquote-DFU91dDT.js 167.00 B +167.00 B
assets/withIsland-BXI5EbLG.js 106.00 B -106.00 B (-100.0%)
assets/withIsland-B_7kmhuS.js 105.00 B +105.00 B
single-executable-applications.html 132.65 KB 132.55 KB -94.00 B (-0.1%)
environment_variables.html 37.55 KB 37.46 KB -85.00 B (-0.2%)
diagnostics_channel.html 520.01 KB 519.93 KB -83.00 B (-0.0%)
string_decoder.html 66.07 KB 65.99 KB -78.00 B (-0.1%)
worker_threads.html 633.41 KB 633.33 KB -78.00 B (-0.0%)
async_context.html 318.07 KB 317.99 KB -77.00 B (-0.0%)
child_process.html 672.72 KB 672.64 KB -77.00 B (-0.0%)
documentation.html 28.40 KB 28.32 KB -77.00 B (-0.3%)
deprecations.html 560.75 KB 560.67 KB -76.00 B (-0.0%)
async_hooks.html 283.47 KB 283.40 KB -75.00 B (-0.0%)
permissions.html 75.00 KB 74.93 KB -75.00 B (-0.1%)
querystring.html 66.82 KB 66.75 KB -75.00 B (-0.1%)
stream_iter.html 725.56 KB 725.49 KB -75.00 B (-0.0%)
perf_hooks.html 744.46 KB 744.39 KB -74.00 B (-0.0%)
typescript.html 50.10 KB 50.03 KB -74.00 B (-0.1%)
webstreams.html 535.22 KB 535.15 KB -74.00 B (-0.0%)
embedding.html 59.60 KB 59.53 KB -73.00 B (-0.1%)
inspector.html 213.74 KB 213.67 KB -73.00 B (-0.0%)
webcrypto.html 628.87 KB 628.80 KB -73.00 B (-0.0%)
debugger.html 143.28 KB 143.21 KB -72.00 B (-0.0%)
packages.html 218.37 KB 218.30 KB -72.00 B (-0.0%)
punycode.html 64.69 KB 64.62 KB -72.00 B (-0.1%)
readline.html 363.52 KB 363.45 KB -72.00 B (-0.0%)
cluster.html 302.58 KB 302.51 KB -71.00 B (-0.0%)
console.html 185.00 KB 184.93 KB -71.00 B (-0.0%)
globals.html 280.35 KB 280.28 KB -71.00 B (-0.0%)
modules.html 227.31 KB 227.24 KB -71.00 B (-0.0%)
process.html 1.14 MB 1.14 MB -71.00 B (-0.0%)
tracing.html 125.91 KB 125.84 KB -71.00 B (-0.1%)
addons.html 379.03 KB 378.96 KB -70.00 B (-0.0%)
assert.html 650.66 KB 650.59 KB -70.00 B (-0.0%)
buffer.html 1.72 MB 1.72 MB -70.00 B (-0.0%)
crypto.html 1.88 MB 1.88 MB -70.00 B (-0.0%)
domain.html 126.37 KB 126.31 KB -70.00 B (-0.1%)
errors.html 518.73 KB 518.66 KB -70.00 B (-0.0%)
events.html 833.42 KB 833.35 KB -70.00 B (-0.0%)
module.html 510.80 KB 510.73 KB -70.00 B (-0.0%)
report.html 231.02 KB 230.95 KB -70.00 B (-0.0%)
sqlite.html 475.16 KB 475.09 KB -70.00 B (-0.0%)
stream.html 1.22 MB 1.22 MB -70.00 B (-0.0%)
timers.html 182.69 KB 182.62 KB -70.00 B (-0.0%)
404.html 21.74 KB 21.67 KB -69.00 B (-0.3%)
dgram.html 299.69 KB 299.63 KB -69.00 B (-0.0%)
http2.html 1.25 MB 1.25 MB -69.00 B (-0.0%)
https.html 240.37 KB 240.30 KB -69.00 B (-0.0%)
index.html 26.54 KB 26.47 KB -69.00 B (-0.3%)
n-api.html 1.00 MB 1.00 MB -69.00 B (-0.0%)
dtls.html 176.56 KB 176.50 KB -68.00 B (-0.0%)
http.html 1.10 MB 1.10 MB -68.00 B (-0.0%)
intl.html 56.26 KB 56.19 KB -68.00 B (-0.1%)
path.html 177.04 KB 176.97 KB -68.00 B (-0.0%)
quic.html 911.82 KB 911.75 KB -68.00 B (-0.0%)
repl.html 302.83 KB 302.76 KB -68.00 B (-0.0%)
test.html 1.35 MB 1.35 MB -68.00 B (-0.0%)
util.html 1.16 MB 1.16 MB -68.00 B (-0.0%)
wasi.html 80.17 KB 80.11 KB -68.00 B (-0.1%)
zlib.html 946.60 KB 946.54 KB -68.00 B (-0.0%)
cli.html 583.72 KB 583.66 KB -67.00 B (-0.0%)
dns.html 421.73 KB 421.67 KB -67.00 B (-0.0%)
esm.html 186.95 KB 186.88 KB -67.00 B (-0.0%)
ffi.html 181.70 KB 181.63 KB -67.00 B (-0.0%)
net.html 631.23 KB 631.17 KB -67.00 B (-0.0%)
tls.html 523.70 KB 523.63 KB -67.00 B (-0.0%)
tty.html 107.04 KB 106.97 KB -67.00 B (-0.1%)
url.html 512.33 KB 512.27 KB -67.00 B (-0.0%)
vfs.html 90.09 KB 90.03 KB -67.00 B (-0.1%)
fs.html 2.18 MB 2.18 MB -66.00 B (-0.0%)
os.html 164.72 KB 164.65 KB -66.00 B (-0.0%)
v8.html 545.84 KB 545.77 KB -66.00 B (-0.0%)
vm.html 633.36 KB 633.29 KB -66.00 B (-0.0%)

Performance estimate (single CI run)

  • Generation time: 26.8% faster (87.03 s → 63.67 s)
  • Peak memory: 31.6% lower (4.74 GB → 3.24 GB)

Assert that the pool forwards the current level through `workerData` and
that a worker actually applies it, using a fixture generator that reports
the level it sees. Removing the fix makes both fail, while the default
level case keeps passing.

Also cover the new `getLogLevel()` accessor.

Signed-off-by: Avocado <ujubongbong@gmail.com>
@zeexzeex

zeexzeex commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

@AugustinMauroy Added tests.

getLogLevel() has unit tests, and the propagation itself is covered in threading/__tests__/index.test.mjs. The second test runs a real worker pool with a fixture generator that reports the level it sees inside the worker, so it fails if the level stops crossing the thread boundary.

I checked that they actually catch this: reverting the workerData line makes both propagation tests fail, while the default level case keeps passing.

@bmuenzenmeyer bmuenzenmeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bmuenzenmeyer
bmuenzenmeyer merged commit 2a356c3 into nodejs:main Sep 21, 2026
23 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc-kit log level is not respected

3 participants