mirror of
https://github.com/jcreek/AutomatedAssessmentFeedbackAgent.git
synced 2026-07-12 18:43:49 +00:00
build(*): Add logging
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import type * as Party from "partykit/server";
|
||||
import logger from "../../src/lib/utils/logger";
|
||||
|
||||
export default class Server implements Party.Server {
|
||||
constructor(readonly room: Party.Room) {}
|
||||
|
||||
onConnect(conn: Party.Connection, ctx: Party.ConnectionContext) {
|
||||
// Log connection details
|
||||
console.log(
|
||||
`Connected:\n id: ${conn.id}\n room: ${this.room.id}\n url: ${new URL(ctx.request.url).pathname}`
|
||||
);
|
||||
logger.info(`Connected:\n id: ${conn.id}\n room: ${this.room.id}\n url: ${new URL(ctx.request.url).pathname}`);
|
||||
}
|
||||
|
||||
onMessage(message: string, sender: Party.Connection) {
|
||||
|
||||
Reference in New Issue
Block a user