mirror of
https://github.com/bitwarden/browser
synced 2026-02-07 12:13:45 +00:00
fix broken imports
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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
11
libs/logging/src/types.ts
Normal 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
12
libs/logging/src/util.ts
Normal 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 🦟",
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user