diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-12-14 23:53:26 -0800 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-12-14 23:55:51 -0800 |
| commit | 4fd40b1f9de400a5d859789e1dad3e1a4ba6587c (patch) | |
| tree | 74fbae949aa3fb9711c06e31cb6649e90a8cdb97 /src/logger.ts | |
| download | canary-4fd40b1f9de400a5d859789e1dad3e1a4ba6587c.tar.gz canary-4fd40b1f9de400a5d859789e1dad3e1a4ba6587c.zip | |
initial commit
Diffstat (limited to 'src/logger.ts')
| -rw-r--r-- | src/logger.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/logger.ts b/src/logger.ts new file mode 100644 index 0000000..05d9fd9 --- /dev/null +++ b/src/logger.ts @@ -0,0 +1,10 @@ +import type { IO } from "fp-ts/lib/IO"; + +export interface Logger { + log: (message: string) => IO<void>; +} + +export const ConsoleLogger: Logger = { + log: (message: string) => () => + console.log(`[${new Date().toUTCString()}] ` + message), +}; |
