refactor(LogAggregationService): improve formatting and logging level in authentication and service files

This commit is contained in:
Nawaz Dhandala
2026-03-12 10:04:45 +00:00
parent a77c59a9bd
commit 27ecf76254
3 changed files with 9 additions and 8 deletions

View File

@@ -366,8 +366,8 @@ router.post(
),
).toString();
logger.info("User forgot password: " + user.email?.toString());
logger.info("Reset Password URL: " + tokenVerifyUrl);
logger.debug("User forgot password: " + user.email?.toString());
logger.debug("Reset Password URL: " + tokenVerifyUrl);
MailService.sendMail({
toEmail: user.email!,

View File

@@ -52,8 +52,7 @@ export class LogAggregationService {
"traceId",
"spanId",
]);
private static readonly ATTRIBUTE_KEY_PATTERN: RegExp =
/^[a-zA-Z0-9._:/-]+$/;
private static readonly ATTRIBUTE_KEY_PATTERN: RegExp = /^[a-zA-Z0-9._:/-]+$/;
private static readonly MAX_FACET_KEY_LENGTH: number = 256;
@CaptureSpan()
@@ -254,7 +253,9 @@ export class LogAggregationService {
return LogAggregationService.TOP_LEVEL_COLUMNS.has(key);
}
private static validateFacetKey(facetKey: unknown): asserts facetKey is string {
private static validateFacetKey(
facetKey: unknown,
): asserts facetKey is string {
if (typeof facetKey !== "string") {
throw new BadDataException("Invalid facetKey");
}

View File

@@ -15,9 +15,9 @@ describe("LogAggregationService", () => {
limit: 15,
};
const buildFacetStatement: (overrides?: Partial<FacetRequest>) => Statement = (
overrides: Partial<FacetRequest> = {},
): Statement => {
const buildFacetStatement: (
overrides?: Partial<FacetRequest>,
) => Statement = (overrides: Partial<FacetRequest> = {}): Statement => {
return (LogAggregationService as any).buildFacetStatement({
...defaultRequest,
...overrides,