logixia 1.12.2 → 1.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -824,6 +824,11 @@ function createTypedLogger(logger$1, schema) {
824
824
  return {
825
825
  raw: logger$1,
826
826
  error(messageOrError, data) {
827
+ if (schema && data) {
828
+ const warnings = schema.validate(data);
829
+ const display = messageOrError instanceof Error ? messageOrError.message : messageOrError;
830
+ for (const w of warnings) internalWarn(`[logixia/schema] ${w} — level=error message="${display}"`);
831
+ }
827
832
  return logger$1.error(messageOrError, data);
828
833
  },
829
834
  warn: (m, d) => withValidation("warn", logger$1.warn.bind(logger$1), m, d),