Skip to content

Commit

Permalink
Fix console, seperate logging envirement, pass clock to log
Browse files Browse the repository at this point in the history
  • Loading branch information
CeEv committed Jun 24, 2024
1 parent 56f0a78 commit 076ff46
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/server/src/modules/tldraw/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const TLDRAW_SOCKET_PORT = Configuration.get('TLDRAW__SOCKET_PORT') as nu

const tldrawConfig = {
TLDRAW_DB_URL,
NEST_LOG_LEVEL: Configuration.get('NEST_LOG_LEVEL') as string,
NEST_LOG_LEVEL: Configuration.get('TLDRAW__LOG_LEVEL') as string,
INCOMING_REQUEST_TIMEOUT: Configuration.get('INCOMING_REQUEST_TIMEOUT_API') as number,
TLDRAW_DB_COMPRESS_THRESHOLD: Configuration.get('TLDRAW__DB_COMPRESS_THRESHOLD') as number,
FEATURE_TLDRAW_ENABLED: Configuration.get('FEATURE_TLDRAW_ENABLED') as boolean,
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/tldraw/repo/y-mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class YMongodb implements OnModuleInit {
ydoc.destroy();
performance.mark('compressDocumentTransactional - end');
performance.measure(
`tldraw:YMongodb:compressDocumentTransactional::${docName}`,
`tldraw:YMongodb:compressDocumentTransactional::${docName}, clock=${clock}`,
'compressDocumentTransactional - start',
'compressDocumentTransactional - end'
);
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/modules/tldraw/tldraw-console.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Dictionary, IPrimaryKey } from '@mikro-orm/core';
import { RabbitMQWrapperModule } from '@infra/rabbitmq';
import { ConsoleWriterModule } from '@infra/console';
import { ConsoleModule } from 'nestjs-console';
import { CoreModule } from '@src/core';
import { FilesStorageClientModule } from '../files-storage-client';
import { config, TLDRAW_DB_URL } from './config';
import { TldrawDrawing } from './entities';
Expand All @@ -23,6 +24,7 @@ const defaultMikroOrmOptions: MikroOrmModuleSyncOptions = {

@Module({
imports: [
CoreModule,
ConsoleModule,
ConsoleWriterModule,
RabbitMQWrapperModule,
Expand Down
6 changes: 6 additions & 0 deletions config/default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,12 @@
"type": "boolean",
"description": "Activate the performance measure for overserved areas.",
"default": true
},
"LOG_LEVEL": {
"type": "string",
"default": "info",
"description": "Nest Log level for api. The http flag is for request logging. The http flag do only work by api methods with added 'request logging interceptor'.",
"enum": ["emerg", "alert", "crit", "error", "warning", "notice", "info", "debug"]
}
},
"default": {
Expand Down

0 comments on commit 076ff46

Please sign in to comment.