diff --git a/.changeset/gentle-pumpkins-walk.md b/.changeset/gentle-pumpkins-walk.md new file mode 100644 index 000000000..9828af63d --- /dev/null +++ b/.changeset/gentle-pumpkins-walk.md @@ -0,0 +1,5 @@ +--- +'@ogma/nestjs-module': patch +--- + +OgmaService properly returns the OgmaService instance when changing the log level, insterad of the underkying Ogma class instance diff --git a/packages/nestjs-module/src/ogma.service.ts b/packages/nestjs-module/src/ogma.service.ts index 377784820..c6974a81a 100644 --- a/packages/nestjs-module/src/ogma.service.ts +++ b/packages/nestjs-module/src/ogma.service.ts @@ -47,7 +47,8 @@ export class OgmaService implements LoggerService { * @param the new log level to use */ public setLogLevel(level: keyof typeof LogLevel) { - return this.ogma.setLogLevel(level); + this.ogma.setLogLevel(level); + return this; } /** @@ -67,7 +68,7 @@ export class OgmaService implements LoggerService { * use Ogma to log at the ERROR level. You can provide a stack trace as well. * @param message What to print to the Ogma instance * @param meta additional information you can print about the log OR the stack trace to print - * @param context a string for the context in which the error log was called. This can be provided as a part of the meta, or as a third paramter to stay in line with Nest's LoggerService + * @param context a string for the context in which the error log was called. This can be provided as a part of the meta, or as a third parameter to stay in line with Nest's LoggerService */ public error( message: any, @@ -103,7 +104,7 @@ export class OgmaService implements LoggerService { } /** - * use Ogma to log at the DBEUG level + * use Ogma to log at the DEBUG level * @param message What to print to the Ogma instance * @param meta extra metadata for the log */