import * as Command from "@effect/cli/Command"
import { Effect, Logger } from "effect"
import { NodeContext, NodeRuntime } from "@effect/platform-node"
// Create a command that logs the provided text argument to the console
const command = Command.make("test-logger", {}, () => Effect.gen(function* () {
yield* Effect.log("log")
yield* Effect.logTrace("logTrace")
yield* Effect.logDebug("logDebug")
yield* Effect.logInfo("logInfo")
yield* Effect.logWarning("logWarning")
yield* Effect.logError("logError")
yield* Effect.logFatal("logFatal")
}))
export const run = Command.run(command, {
name: "Test loggger",
version: "v0.0.1"
})
run(process.argv).pipe(
Effect.provide(NodeContext.layer),
// Effect.provide(Logger.logFmt),
NodeRuntime.runMain()
)
import * as Command from "@effect/cli/Command"
import { Effect, Logger } from "effect"
import { NodeContext, NodeRuntime } from "@effect/platform-node"
// Create a command that logs the provided text argument to the console
const command = Command.make("test-logger", {}, () => Effect.gen(function* () {
yield* Effect.log("log")
yield* Effect.logTrace("logTrace")
yield* Effect.logDebug("logDebug")
yield* Effect.logInfo("logInfo")
yield* Effect.logWarning("logWarning")
yield* Effect.logError("logError")
yield* Effect.logFatal("logFatal")
}))
export const run = Command.run(command, {
name: "Test loggger",
version: "v0.0.1"
})
run(process.argv).pipe(
Effect.provide(NodeContext.layer),
// Effect.provide(Logger.logFmt),
NodeRuntime.runMain()
)