1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 12:13:45 +00:00

fix broken imports

This commit is contained in:
John Harrington
2025-10-10 08:23:51 -07:00
parent 46f5365a0f
commit b992c19ea4
7 changed files with 8 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
import { mock } from "jest-mock-extended";
import { LogService } from "../../platform/abstractions/log.service";
import { LogLevelType } from "../../platform/enums";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { LogLevelType } from "@bitwarden/common/platform/enums";
import { DefaultSemanticLogger } from "./default-semantic-logger";

View File

@@ -1,7 +1,7 @@
import { Jsonify } from "type-fest";
import { LogService } from "../../platform/abstractions/log.service";
import { LogLevelType } from "../../platform/enums";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { LogLevelType } from "@bitwarden/common/platform/enums";
import { SemanticLogger } from "./semantic-logger.abstraction";

View File

@@ -1,6 +1,6 @@
import { Jsonify } from "type-fest";
import { deepFreeze } from "../util";
import { deepFreeze } from "@bitwarden/common/tools/util";
import { SemanticLogger } from "./semantic-logger.abstraction";

View File

@@ -1,6 +1,6 @@
import { Jsonify } from "type-fest";
import { LogService } from "../../platform/abstractions/log.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { DefaultSemanticLogger } from "./default-semantic-logger";
import { DISABLED_LOGGER } from "./disabled-logger";

11
libs/logging/src/types.ts Normal file
View File

@@ -0,0 +1,11 @@
import { Jsonify } from "type-fest";
import { SemanticLogger } from "./semantic-logger.abstraction";
/** Creates a semantic logger.
* @param context all logs emitted by the logger are extended with
* these fields.
* @remarks The `message`, `level`, `provider`, and `content` fields
* are reserved for use by the semantic logging system.
*/
export type LogProvider = <Context extends object>(context: Jsonify<Context>) => SemanticLogger;

12
libs/logging/src/util.ts Normal file
View File

@@ -0,0 +1,12 @@
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
// show our GRIT - these functions implement generalized logging
// controls and should return DISABLED_LOGGER in production.
export function warnLoggingEnabled(logService: LogService, method: string, context?: any) {
logService.warning({
method,
context,
provider: "tools/log",
message: "Semantic logging enabled. 🦟 Please report this bug if you see it 🦟",
});
}