Repository navigation
Releases: toreda/log
Releases · toreda/log
Release list
v1.0.0 - 2026-09-17
Headlines
- Added dual esm/cjs output to support ESM consumers.
Changed
Log.addTransportnow returns aTransportAddResultobject ({ok, errorCode?, errors?}) instead of a boolean, and never throws. Transport construction failures are reported witherrorCode: 'transport_init_failed'and the thrown error inerrors.Transportctor now throws whenlevelis not a valid log level instead of silently defaulting toLevels.NONE.
Fixed
- startingGroups now runs at the end of the Log ctor and no longer throws when provided.
make('a.b')no longer creates a group keyedroot.a.bwhose parent isrootinstead ofroot.a, which collided withroot.make('a').make('b'). Group ids and parents now always match the full hierarchy.- Ids that are whitespace-only or contain an empty segment (
'a..b','.a') now returnnullinstead of creating a group with a malformed id.
Added
Log.make(id, options?)replacesmakeLogas the way to get or create a child log group.makeLogremains as a deprecated alias that callsmake, so existing call sites keep working.- A dotted id walks the hierarchy one segment at a time, so
root.make('a.b')returns the same log asroot.make('a').make('b')and creates missing intermediate groups. LevelKeystring union ('none' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'all' | 'all_custom' | 'all_extended') is accepted anywhere a level bitmask is:Loglevel methods,Log.log,LogLevel,Transport, and theglobalLevel/leveloptions. Levels are still stored and compared as bitmasks internally.- Level arguments also accept an array mixing keys and bitmasks.
enableLevel/disableLevelstyle methods resolve each item to its bitmask and apply it in order, one at a time.set,log, and constructors combine the array with bitwise OR into a single mask. LevelKeysmap from key to bitmask,LevelInputtype (number | LevelKey),checkLevelKeytype guard, andlevelMaskhelper that resolves a key, bitmask, or array to a bitmask, ornullwhen any input is invalid.
v0.6.11 - 2022-01-03
Updated
- All direct NPM dependencies updated to latest, including yesterday's release of
@toreda/types. - Rebuilt yarn lock file.
0.5.0
Merge pull request #9 from toreda/develop Refactor
0.4.1
Develop (#8) * Some basic functionality and map out tests * testing for logger started * finished logger tests * log-listener tests * use handleMessage() to put message in logs, user action() does something with logs on showLogs() * cleaned up init and props using options/state interfaces for both Logger and LogListener * random ids for logger and logevents * Switched from using emits and listeners to using transports * Functional, but having trouble with testing async execute function * dumb errors that I didn't catch before push * finished async test * a few fixes to tests * sonar scanner update * some fixes to condition coverage * created a default action for transports * Remove old files * sonarcloud suggested changes * change bitwise lint from error to warning in this project. * more linting errors * more linting * Updated the README to show usage and added some functions to make Logger easier to use. * Final? change * Removed tslint in favor of eslint using toreda org rules for typescript. Updated package naming. Removed prettier.config.js and replaced with toreda package.json key '@toreda/prettier-config'. Updated license * Updated .gitattributes to standardize file line endings. * Added example file. Updated readme examples. * Updated github actions to run on develop branch instead of just master. * Fixed sonar token secret id in github workflow. * didn't pull before fixes so they had to redone * Added eslint as project dependency with toreda rules. Changed EOL to LF. Updated classnames using "Logger" (old package name) to "Log" prefix for consistency. No class changes made beyond rename. * Use updated ActionResult and fixed errors from updated tslint * Added relative path prefix to sonar.sources and sonar.tests * Added public flag to package.json Moved prettier package to devDependencies * Fixed test errors caused by Typescript version upgrade and empty promise resolve calls. * Refactoring to add log groups. * Cleanup, refactoring, and more tests for log groups. * Tests & refactoring for LogTransport Tests & refactoring for LogState Removed LogTransportState, which was no longer needed after refactoring. * Fixed broken Log and LogTransport tests due to refactoring. * Renamed LogTransportAction to LogAction to better convey role. Simple refactoring to support tests and fix errors found during testing. Expanding tests for groups, transports, and log. * Cleanup and fixed more tests across all classes * Cleanup and fixed more tests across all classes Removed LogTransportOptions which is no longer used. Added init time global and group log level settings with tests. * Updated readme Updated LogLevels to be the expected bitmasks. ALL did not include all previous bits in mask. Added remove by id methods for transports. * Removed `@toreda/action-result` package as its not longer used in project. * Updated docs Added additional helper methods and tests in Log and Group for handling log levels and multiple transport removals. * Added additional start options. Added console logging support which is disabled on start unless specifically enabled by start options. * Updated autogenerated docs * Updated readme * Updated version number for pending release. Added missing LogActionConsole to package exports. * Edit types for better code hinting. Little bit of formatting of imports * Check for options before calling parse. Update eslint-config. Use alias paths in test files * Update strong-types # Conflicts: # .eslintrc.js # src/log.ts # src/log/group.ts # src/log/state.ts # tests/log.spec.ts # tests/log/group.spec.ts * Removed null check in state. update yarn.lock after yarn upgrade * fixed some convoluted import paths * Update package version from 0.4.0 to 0.4.1 Co-authored-by: Michael Brich <mike@toreda.com> Co-authored-by: Michael Brich <mbrich@users.noreply.github.com>