Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Read log level from env var * Fixes #9. * With these changes, the log level will be able to read from the env var with `LOG_LEVEL` key. Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Replace os.Getenv with t.Getenv * Update .gitignore. Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Add `WithLevelFromString` option * `readLevelFromEnv` function is removed. * Tests updated. Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Add `ParseLevel` function * This function converts string to Level type. * Unit test implemented. Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Remove switch-case blocks * Replace swich-case blocks with `ParseLevel` function in `WithLevelFromString`. Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Remove `WithLevelFromString` option Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Update tests * Revert changes in `log_test.go`. * Update test cases in `level_test.go`. Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Remove empty line Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Remove env var related test cases Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> * Remove unneeded line Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com> --------- Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
- Loading branch information