@arki/log
For @arki/[email protected] · source CHANGELOG.md
0.3.0
Minor Changes
- 69479f8:
maskSecrets(values)processor: replaces every occurrence of a known secret value (8+ characters) in the template, string fields at any depth, the serialised error and the body. Pairs withsecretValuesfrom@arki/env/node:processors: [maskSecrets(secretValues)]. Also exportsMIN_SECRET_LENGTH.
0.2.0
Minor Changes
- c7720e1: A failure value from
@arki/failurecan be logged as a field:log.warn('lookup failed', { failure }). Every formatter and the OpenTelemetry sink print itscode,message,status,dataandremediation, pluscauses: the cause chain, nearest first, through nested failures and thrown errors. The list stops at a cycle ([Circular]) or after 64 links ([MaxDepth]), the same limit asfindCause.redact()paths reach into a failure's data and causes.@arki/logstill has no dependencies: it knows a failure by its'~failure'brand. New exports:serializeFailureand theFailureLiketype, which is now part ofValue. - 4913009: Security: outside data can no longer pass as a failure.
isFailure(and@arki/log's failure check) now require the~failurebrand on the value's prototype and refuse it as an own property. Before, JSON such as{"~failure": true, "code": "x", "status": 500}from an API response, queue message or tool result counted as a failure, so boundaries skipped output schemas and answered with an attacker-chosen status or code. Real failures, revived ones and failures from a second copy of the package are still recognised. - e61afc2:
configure(config, { owner }): an app entry can now run again in the same process withoutARKI_LOG_E001. Nitro's dev worker re-imports the server entry after an edit and never runsimport.meta.hotdispose hooks, so the secondconfigure()threw and every page returned 500. When both calls pass the sameowner(useimport.meta.url), the second call replaces the setup, closes the old sinks, and makes the old handle stale. Any other secondconfigure()still throwsARKI_LOG_E001. New type:ConfigureOptions.
Patch Changes
-
fe5a391: README follows the docs standard (install, quick start from a tested example, limits, failure behaviour), with
llms.txt, an agent guide,AGENTS.md,test:docsand the 0.1.0 to 0.2.0 upgrade guide.ARKI_LOG_E001toE005gain@fixand@verifytags.no demo impact: documentation and doc-example changes only, runtime behaviour unchanged
0.1.0
Minor Changes
-
2854df5:
@arki/logis rebuilt. It has zero dependencies, runs on Node, Bun, Deno, browsers and React Native, and importing it does nothing: no env read, no output, no listener. Libraries log withgetLogger('arki:...'); apps switch logging on once, in their entry file.Apps must now switch logging on. Until an app calls
configure()(or mountslog()in a Dot app), only the first 64 records atwarnand above are kept, and nothing else is written.import { configure } from '@arki/log'; import { asyncContext, fromEnv, stdout } from '@arki/log/node'; configure({ ...fromEnv(), // LOG_LEVEL, DEBUG=arki:kv:* context: asyncContext(), channels: { stdout: stdout() }, default: { level: 'info', channels: ['stdout'] }, });A Dot app does the same as its first
.use(...):import { log } from '@arki/dot/log'; defineApp('checkout').use( log(() => ({ ...fromEnv(), context: asyncContext(), channels: { stdout: stdout() }, default: { level: 'info', channels: ['stdout'] }, })), );How to migrate a call site:
Before After createLogger('x')getLogger('x')createLogger('x', attrs)getLogger('x').with(attrs)new Logger(name, attrs)getLogger(name).with(attrs).withAttribute(k, v).with({ [k]: v }).child(name, attrs).child(name).with(attrs)log.info('text', attrs)unchanged (the text is now a template; {name}reads a field)log.info({ ...object })log.emit({ level: 'info', eventName: '<category>.<what>', body: {...} })log.warn(err)log.warn('<what failed>', { error: err })debug('ns')from@arki/log/debuggetLogger('ns'), then.debug('text {field}', { field })instead of%sargumentsAttributes,BodytypesFields; aBodycaller uses a string oremitRemoved:
@arki/log/debug,@arki/log/core(now@arki/logitself), theLoggerclass,rootLogger,createLogger,configuration, batching, the Google Cloud formatter, and thepinoanddebugdependencies.DEBUG=arki:*still works throughfromEnv().New entry points:
@arki/log/node(stdout,stderr,file,fromEnv,asyncContext),@arki/log/otel(otelTrace,otelSink; the@opentelemetry/*packages are optional peers) and@arki/log/testing(fakeLog).@arki/dot: plugins can fill a new logging slot (plugin({ logging: ({ appName }) => handle })). The kernel switches logging on before its first lifecycle record and closes it after its last one, also when boot fails. Two logging plugins in one app isDOT_LIFECYCLE_E018.@arki/dot/logexportslog(), which fills the slot, names the service after the app and publishes the handle as theloggingservice. Hook spans now stamp their trace on log records through@arki/log, and importing@arki/dotreads no env and writes nothing.
0.0.3
Patch Changes
- Dependency refresh:
pino^10.4.0. No API changes.
0.0.2
Patch Changes
- Ship TypeScript source in the npm tarball (
src/**added tofiles). npm installs and the read-only GitHub mirrors now carry the original.tssource alongside compileddist/— better debuggability on the experimental track. No runtime changes.
0.0.1
Initial release
-
First public publication on npm (experimental track) — 2026-05-21.
Part of Wave 1, the ARKI foundation: zero-dependency utilities and runtime primitives shipped together because every downstream wave (DOT kernel, infrastructure adapters) consumes them. Wave 1 packages:
assert,clock,contracts,date,env,log,resilience,slugify,string,ts.Why 0.0.x, not 1.0.0: ARKI is on an experimental track. The 0.0.x prefix is an honest signal — APIs may change without semver discipline until the kernel is field-tested. The release scorecard (metadata, privacy, dependencies, build-output, packlist, docs, fixtures, DOT gates, agent-native gates) is satisfied at this version; the gate certifies the artifact, not API stability. Stability is earned through reuse, not declared at first publication.
Wave 2 (
@arki/dot) and Wave 3 (@arki/db,@arki/kv,@arki/event-sourcing) publish in subsequent releases once their inter-package transitive resolution against the public npm registry is verified.