Aalexbit-codemod

mine-structured-logging

Mine Winston LoggerService and unstructured logging patterns; read-only metrics

miningmetricsloggingwinstonobservabilitycode-mining
PRO
0 executions

Run locally

npx codemod mine-structured-logging

This is a Pro codemod. Preview changes and insights for free, no login or code sharing required. Applying changes and accessing insights requires a paid plan and sign in.Learn more

mine-structured-logging

Pro read-only mining codemod. Inventories Backstage LoggerService / Winston usage versus console.* and unstructured string-concat / template logs. Does not modify source.

Metrics

Emits observability_finding and observability_finding_summary.

Shared cardinalities (observability_finding)

CardinalityValues / meaning
categoryAlways logging
finding_typeSee table below
severityinfo or medium
automatabletrue, false, or partial
priority_hint1572
migration_lanekeep (structured) or replace (console / unstructured)
rule_idLOG-001LOG-004
file, line, symbol, packageLocation and enclosing symbol

observability_finding_summary keeps only category, finding_type, severity, migration_lane.

Rules / finding_type

Rulefinding_typeWhat it means
LOG-001logger_service_usageLoggerService / RootLoggerService / WinstonLogger references
LOG-002winston_usageDirect winston imports
LOG-003console_loggingconsole.log / info / warn / error / debug
LOG-004string_concat_loglogger.* calls with + concatenation or unsubstituted-style templates without structured meta

Ready to contribute?

Build your own codemod and share it with the community.