Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: explicitly set the styler type #1830

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/violet-steaks-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ogma/nestjs-module': patch
---

Explicitly set the styler type
3 changes: 2 additions & 1 deletion packages/nestjs-module/src/ogma.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Injectable, LoggerService, Optional } from '@nestjs/common';
import { LogLevel, OgmaWritableLevel } from '@ogma/common';
import { Ogma } from '@ogma/logger';
import type { Styler } from '@ogma/styler';

import { InjectOgma, InjectOgmaContext, InjectTraceMethod } from './decorators';
import { OgmaServiceMeta } from './interfaces';
Expand Down Expand Up @@ -47,7 +48,7 @@ export class OgmaService implements LoggerService {
* instance that the logger uses for custom coloring without needing
* to manage a new styler instance
*/
public get style() {
public get style(): Styler {
return this.ogma.style;
}

Expand Down
Loading