Skip to content
Snippets Groups Projects
Commit e53baa20 authored by Zdravko Iliev's avatar Zdravko Iliev
Browse files

feat: add log level from env vars

parent 272d718c
No related branches found
No related tags found
1 merge request!66feat: add log level from env vars
Pipeline #69652 passed with stage
in 2 minutes and 12 seconds
......@@ -12,7 +12,6 @@ import {
CredentialEventTypes,
HttpOutboundTransport,
InitConfig,
LogLevel,
ProofEventTypes,
TypedArrayEncoder,
WsOutboundTransport,
......@@ -52,7 +51,7 @@ export class AskarService implements OnModuleInit, OnModuleDestroy {
const config = {
label: this.agentConfig.agentName,
logger: new ConsoleLogger(LogLevel.debug),
logger: new ConsoleLogger(this.agentConfig.logLevel),
walletConfig: {
storage: {
type: "postgres",
......
import { registerAs } from "@nestjs/config";
import * as process from "process";
import { IConfAgent } from "../interfaces/agent.config.interface";
import { LogLevel } from "@aries-framework/core";
export const agentConfig = registerAs(
"agent",
......@@ -34,5 +35,6 @@ export const agentConfig = registerAs(
agentAuthBasicPass: process.env["AUTH_BASIC_PASS"]!,
agentAuthJwtEnabled: !!process.env["AUTH_JWT_PUBLIC_KEY"],
agentAuthJwtPublicKey: process.env["AUTH_JWT_PUBLIC_KEY"]!,
logLevel: parseInt(process.env["LOG_LEVEL"]!) || LogLevel.error,
}),
);
......@@ -24,4 +24,6 @@ export interface IConfAgent {
agentAuthBasicPass: string;
agentAuthJwtEnabled: boolean;
agentAuthJwtPublicKey: string;
logLevel: number;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment