diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-19 13:58:13 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-19 13:58:13 +0100 |
commit | 23e27dd53599be65b2dc2968448ce155a00a96c9 (patch) | |
tree | cd7e5c88a345584a25c7ea03a81332b804d082d6 /server/initializers | |
parent | c7a9f34f7229529ea726de13867f87c0a8dd3007 (diff) | |
download | PeerTube-23e27dd53599be65b2dc2968448ce155a00a96c9.tar.gz PeerTube-23e27dd53599be65b2dc2968448ce155a00a96c9.tar.zst PeerTube-23e27dd53599be65b2dc2968448ce155a00a96c9.zip |
Add ability to configure log level
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/checker.ts | 2 | ||||
-rw-r--r-- | server/initializers/constants.ts | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts index 7cfbc123d..35fab244c 100644 --- a/server/initializers/checker.ts +++ b/server/initializers/checker.ts | |||
@@ -21,7 +21,7 @@ function checkMissedConfig () { | |||
21 | const required = [ 'listen.port', | 21 | const required = [ 'listen.port', |
22 | 'webserver.https', 'webserver.hostname', 'webserver.port', | 22 | 'webserver.https', 'webserver.hostname', 'webserver.port', |
23 | 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', | 23 | 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', |
24 | 'storage.videos', 'storage.logs', 'storage.thumbnails', 'storage.previews', 'storage.torrents', 'storage.cache', | 24 | 'storage.videos', 'storage.logs', 'storage.thumbnails', 'storage.previews', 'storage.torrents', 'storage.cache', 'log.level', |
25 | 'cache.previews.size', 'admin.email', 'signup.enabled', 'signup.limit', 'transcoding.enabled', 'transcoding.threads', 'user.video_quota' | 25 | 'cache.previews.size', 'admin.email', 'signup.enabled', 'signup.limit', 'transcoding.enabled', 'transcoding.threads', 'user.video_quota' |
26 | ] | 26 | ] |
27 | const miss: string[] = [] | 27 | const miss: string[] = [] |
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index c10213890..cb043251a 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -113,6 +113,9 @@ const CONFIG = { | |||
113 | URL: '', | 113 | URL: '', |
114 | HOST: '' | 114 | HOST: '' |
115 | }, | 115 | }, |
116 | LOG: { | ||
117 | LEVEL: config.get<string>('log.level') | ||
118 | }, | ||
116 | ADMIN: { | 119 | ADMIN: { |
117 | get EMAIL () { return config.get<string>('admin.email') } | 120 | get EMAIL () { return config.get<string>('admin.email') } |
118 | }, | 121 | }, |