@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Angular service that creates context-scoped Logger instances.

    Inject LoggerFactory wherever you need a logger and call createLogger with a context string (typically the class name). A ConsoleLoggingStrategy is used by default, but you can supply any ILoggingStrategy to redirect output.

    export class MyComponent {
    private readonly log = inject(LoggerFactory).createLogger("MyComponent");

    public ngOnInit(): void {
    this.log.debug("component initialised");
    }
    }
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Creates a new Logger bound to the given context.

      Parameters

      Returns Logger

      A ready-to-use Logger instance.