mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
[misc] silence logger when running tests (#22243)
* [misc] silence logger when running tests * [misc] re-enable logging in some tests for scripts * [misc] make it easy to turn on verbose logging for tests ``` LOG_LEVEL=debug make test_unit LOG_LEVEL=debug make test_acceptance ``` GitOrigin-RevId: 219bc6d1f9cbdb89ddd7d94742920913ddde4514
This commit is contained in:
@@ -14,8 +14,10 @@ const LoggingManager = {
|
||||
initialize(name) {
|
||||
this.isProduction =
|
||||
(process.env.NODE_ENV || '').toLowerCase() === 'production'
|
||||
const isTest = (process.env.NODE_ENV || '').toLowerCase() === 'test'
|
||||
this.defaultLevel =
|
||||
process.env.LOG_LEVEL || (this.isProduction ? 'info' : 'debug')
|
||||
process.env.LOG_LEVEL ||
|
||||
(this.isProduction ? 'info' : isTest ? 'fatal' : 'debug')
|
||||
this.loggerName = name
|
||||
this.logger = bunyan.createLogger({
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user