LiskArchive/lisk-migrator

Add edge-case scenario handling in getLogLevel

Closed this issue · 0 comments

Expected behavior

getLogLevel must always return the log levels with highest priority.

Actual behavior

When user's custom config has one of the following (or similar) logger configs, getLogLevel always returns info instead of the higher priority trace.

	{
		"fileLogLevel": "trace",
		"consoleLogLevel": "eror", // wrong level specified
	}

or

	{
		"fileLogLevel": "trace",
		// "consoleLogLevel" missing
	}

Steps to reproduce

  • Execute getLogLevel with the above as the input params.

Which version(s) does this affect? (Environment, OS, etc...)

v2.0.0