MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / getLoggerContext

Method getLoggerContext

packages/core/src/EntityManager.ts:460–465  ·  view source on GitHub ↗

* Gets logger context for this entity manager.

(options?: { disableContextResolution?: boolean })

Source from the content-addressed store, hash-verified

458 * Gets logger context for this entity manager.
459 */
460 getLoggerContext<T extends Dictionary = Dictionary>(options?: { disableContextResolution?: boolean }): T {
461 const em = options?.disableContextResolution ? this : this.getContext();
462 em.loggerContext ??= {};
463
464 return em.loggerContext as T;
465 }
466
467 /** Sets the flush mode for this EntityManager. Pass `undefined` to reset to the global default. */
468 setFlushMode(flushMode?: FlushMode | `${FlushMode}`): void {

Calls 1

getContextMethod · 0.95

Tested by

no test coverage detected