McpLogging Module
Composition-root logging for the stdio MCP host: one Serilog-backed logger for the whole session, gated by GENPRES_LOG exactly as the server's `loggingEnabled`/`loggingLevel` are (unset or blank => logging off => Logging.noOp). Duplicated rather than referenced from Informedica.GenPRES.Server, since Informedica.MCP.Lib/Informedica.MCP.Server are siblings to that project and must not reference it.
Nested modules
| Modules | Description |
|
What a sink writes for a log event. Rendering happens here, on the sink's thread. |
|
|
Turns a Serilog ILogger into the domain-facing Logger record. The whole Event crosses as one scalar property: the thread that logs stores a reference and enqueues, and the text is rendered by the sink's formatter on the sink's own thread. That is safe because an Event and every message under it is immutable. This is the server's bridge written a second time: only the two executables refer to Serilog, and neither refers to the other. |
Functions and values
| Function or value |
Description
|
|
|
|
The logger that writes to the file at `path`. Each sink sits behind its own queue and thread, so the thread that logs only enqueues. stdout is the JSON-RPC transport channel of a stdio MCP session, so the console sink writes every event to stderr, never stdout: `standardErrorFromLevel = Verbose` is below Debug, the lowest level there is.
|
Full Usage:
getLogger getEnv
Parameters:
string -> string option
Returns: Logger * (unit -> unit)
|
Returns the `Logger` port value plus a disposer: `Program.fs`'s `main` calls the disposer after `McpServer.run` returns.
|
Full Usage:
getRecommendedLogPath componentName
Parameters:
string option
Returns: string
|
|
|
|
GenPRES