Files
t3code/apps/server/src/serverLogger.ts
T
d249e628ee Stage production icons for desktop builds and publish (#168)
* Stage production icons for desktop builds and publish

- add shared brand asset paths and a Windows .ico asset
- stage Linux/Windows icons in desktop artifact builds
- override and restore publish favicon during server CLI publish

* 'blip'

* Fix PR review issues for publish icon staging

* Refactor brand assets and harden Windows desktop build setup

* Apply remaining server orchestration updates

* Fix production mac icon asset

Co-authored-by: Theo Browne <[email protected]>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Theo Browne <[email protected]>
2026-03-06 13:54:31 -08:00

25 lines
656 B
TypeScript

import fs from "node:fs";
import path from "node:path";
import { Effect, Logger } from "effect";
import * as Layer from "effect/Layer";
import { ServerConfig } from "./config";
export const ServerLoggerLive = Effect.gen(function* () {
const config = yield* ServerConfig;
const logDir = path.join(config.stateDir, "logs");
const logPath = path.join(logDir, "server.log");
yield* Effect.sync(() => {
fs.mkdirSync(logDir, { recursive: true });
});
const fileLogger = Logger.formatSimple.pipe(Logger.toFile(logPath));
return Logger.layer([Logger.defaultLogger, fileLogger], {
mergeWithExisting: false,
});
}).pipe(Layer.unwrap);