1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 05:30:01 +00:00
This commit is contained in:
✨ Audrey ✨
2025-03-12 10:32:48 -04:00
parent cd978a654e
commit 7589692fb1
5 changed files with 23 additions and 23 deletions

View File

@@ -5,13 +5,14 @@ import { Classifier } from "../../state/classifier";
import { EcsFormat } from "./core";
/** Removes all properties except ECS properties and the listed properties.
*/
export class EcsClassifier<LogFormat extends EcsFormat> implements Classifier<LogFormat, unknown, unknown> {
classify(value: LogFormat): { disclosed: never; secret: never; } {
*/
export class EcsClassifier<LogFormat extends EcsFormat>
implements Classifier<LogFormat, unknown, unknown>
{
classify(value: LogFormat): { disclosed: never; secret: never } {
throw new Error("Method not implemented.");
}
declassify(disclosed: never, secret: never): Jsonify<LogFormat> {
throw new Error("Method not implemented.");
}
}

View File

@@ -4,12 +4,12 @@ export type ErrorFormat = EcsFormat & {
/** Error indicators collected by the provider */
error: {
/** content from the message field of the error */
message: string,
message: string;
/** content from the error's stack trace */
stack_trace: string,
stack_trace: string;
/** the type of the error, for example the error's class name */
type: string
},
type: string;
};
};

View File

@@ -4,13 +4,13 @@ export type LogFormat = EcsFormat & {
/** Log metadata */
log: {
/** original log level of the event */
level: "debug" | "info" | "warn" | "error",
level: "debug" | "info" | "warn" | "error";
/** source of the event; this is usually a type name */
logger: string,
logger: string;
// FIXME: if it becomes possible to include line/file numbers,
// add the origin fields from here:
// https://www.elastic.co/guide/en/ecs/current/ecs-log.html
}
}
};
};

View File

@@ -1,13 +1,13 @@
import { UserId } from "../../../types/guid"
import { UserId } from "../../../types/guid";
import { EcsFormat } from "./core";
export type UserFormat = EcsFormat & {
/** Account indicators collected by the provider
* WARNING: `UserFormat` should be used sparingly; it is PII.
*/
*/
user: {
id: UserId,
email?: string,
}
id: UserId;
email?: string;
};
};

View File

@@ -5,14 +5,13 @@ import { Classifier } from "../state/classifier";
import { EcsFormat } from "./ecs-format";
export type LogKey<LogFormat extends EcsFormat, N extends number = 100> = {
target: "log",
format: "classified_circular_buffer",
size: N,
key: string,
target: "log";
format: "classified_circular_buffer";
size: N;
key: string;
state: StateDefinition;
cleanupDelayMs?: number;
classifier: Classifier<LogFormat, unknown, unknown>,
classifier: Classifier<LogFormat, unknown, unknown>;
/** For encrypted outputs, determines how much padding is applied to
* encoded inputs. When this isn't specified, each frame is 32 bytes