Skip to content

Commit 5509d9e

Browse files
Andrew Farriesroboquat
Andrew Farries
authored andcommitted
Remove logLevel from server config
Where we need it, take it from the environment.
1 parent 5d99db0 commit 5509d9e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

components/server/ee/src/prebuilds/github-app.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ export class GithubApp {
6767
@inject(PrebuildStatusMaintainer) protected readonly statusMaintainer: PrebuildStatusMaintainer,
6868
) {
6969
if (config.githubApp?.enabled) {
70+
const logLevel = LogrusLogLevel.getFromEnv() ?? "info";
71+
7072
this.server = new Server({
7173
Probot: Probot.defaults({
7274
appId: config.githubApp.appId,
7375
privateKey: GithubApp.loadPrivateKey(config.githubApp.certPath),
7476
secret: config.githubApp.webhookSecret,
75-
logLevel: GithubApp.mapToGitHubLogLevel(config.logLevel),
77+
logLevel: GithubApp.mapToGitHubLogLevel(logLevel),
7678
baseUrl: config.githubApp.baseUrl,
7779
}),
7880
});

components/server/src/config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { CodeSyncConfig } from "./code-sync/code-sync-service";
1414
import { ChargebeeProviderOptions, readOptionsFromFile } from "@gitpod/gitpod-payment-endpoint/lib/chargebee";
1515
import * as fs from "fs";
1616
import * as yaml from "js-yaml";
17-
import { log, LogrusLogLevel } from "@gitpod/gitpod-protocol/lib/util/logging";
17+
import { log } from "@gitpod/gitpod-protocol/lib/util/logging";
1818
import { filePathTelepresenceAware } from "@gitpod/gitpod-protocol/lib/env";
1919

2020
export const Config = Symbol("Config");
@@ -52,7 +52,6 @@ export interface ConfigSerialized {
5252
installationShortname: string;
5353
devBranch?: string;
5454
insecureNoDomain: boolean;
55-
logLevel: LogrusLogLevel;
5655

5756
// Use one or other - licenseFile reads from a file and populates license
5857
license?: string;

0 commit comments

Comments
 (0)