Remove Zod from core log (#27102)
This commit is contained in:
@@ -4,11 +4,14 @@ import path from "path"
|
|||||||
import fs from "fs/promises"
|
import fs from "fs/promises"
|
||||||
import { createWriteStream } from "fs"
|
import { createWriteStream } from "fs"
|
||||||
import * as Global from "../global"
|
import * as Global from "../global"
|
||||||
import z from "zod"
|
import { Schema } from "effect"
|
||||||
import { Glob } from "./glob"
|
import { Glob } from "./glob"
|
||||||
|
|
||||||
export const Level = z.enum(["DEBUG", "INFO", "WARN", "ERROR"]).meta({ ref: "LogLevel", description: "Log level" })
|
export const Level = Schema.Literals(["DEBUG", "INFO", "WARN", "ERROR"]).annotate({
|
||||||
export type Level = z.infer<typeof Level>
|
identifier: "LogLevel",
|
||||||
|
description: "Log level",
|
||||||
|
})
|
||||||
|
export type Level = Schema.Schema.Type<typeof Level>
|
||||||
|
|
||||||
const levelPriority: Record<Level, number> = {
|
const levelPriority: Record<Level, number> = {
|
||||||
DEBUG: 0,
|
DEBUG: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user