Skip to content

Commit

Permalink
switched to enum
Browse files Browse the repository at this point in the history
  • Loading branch information
alweber-cap committed Nov 22, 2023
1 parent 79b4793 commit 5d18602
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/core/logging/class-logger.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DeepMocked, createMock } from '@golevelup/ts-jest';
import { Test, TestingModule } from '@nestjs/testing';
import { Logger } from 'winston';
import { ConfigTestModule } from '../../../test/utils/config-test.module.js';
import { ConfigTestModule } from '../../../test/utils/index.js';
import { ClassLogger } from './class-logger.js';
import { LoggerModule } from './logger.module.js';
import { ModuleLogger } from './module-logger.js';
Expand Down
32 changes: 16 additions & 16 deletions src/shared/config/logging.config.ts
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
import { IsEnum, IsNotEmpty, IsOptional } from 'class-validator';

const ALLOWED_VALUES: string[] = ['debug', 'info', 'warn', 'notice', 'warning', 'error', 'crit', 'alert', 'emerg'];

export class LoggingConfig {
@IsString()

Check warning on line 6 in src/shared/config/logging.config.ts

View workflow job for this annotation

GitHub Actions / Linting / Nest Lint

Delete `⏎`
@IsNotEmpty()
@IsEnum(ALLOWED_VALUES)
public readonly DEFAULT_LOG_LEVEL!: string;

//Domain Modules
@IsOptional()
@IsString()
@IsEnum(ALLOWED_VALUES)
public readonly PERSON_MODULE_LOG_LEVEL?: string;

@IsOptional()
@IsString()
@IsEnum(ALLOWED_VALUES)
public readonly ORGANISATION_MODULE_LOG_LEVEL?: string;

@IsOptional()
@IsString()
@IsEnum(ALLOWED_VALUES)
public readonly ROLLE_MODULE_LOG_LEVEL?: string;

//API Modules
@IsOptional()
@IsString()
public readonly PERSON_API_MODULE_LOG_LEVEL?: string;

@IsOptional()
@IsString()
public readonly ORGANISATION_API_MODULE_LOG_LEVEL?: string;
@IsEnum(ALLOWED_VALUES)
public readonly PERSON_API_MODULE_LOG_LEVEL!: string;

@IsOptional()
@IsString()
@IsEnum(ALLOWED_VALUES)
public readonly ROLLE_API_MODULE_LOG_LEVEL?: string;

//Technical Modules
@IsOptional()
@IsString()
@IsEnum(ALLOWED_VALUES)
public readonly SERVER_MODULE_LOG_LEVEL?: string;

@IsOptional()
@IsString()
@IsEnum(ALLOWED_VALUES)
public readonly KEYCLOAK_ADMINISTRATION_MODULE_LOG_LEVEL?: string;

@IsOptional()
@IsString()
@IsEnum(ALLOWED_VALUES)
public readonly HEALTH_MODULE_LOG_LEVEL?: string;

//SPSH Modules
@IsOptional()
@IsString()
@IsEnum(ALLOWED_VALUES)
public readonly BACKEND_FOR_FRONTEND_MODULE_LOG_LEVEL?: string;

@IsString()
@IsOptional()
@IsEnum(ALLOWED_VALUES)
public readonly UI_BACKEND_MODULE_LOG_LEVEL?: string;
}

0 comments on commit 5d18602

Please sign in to comment.