Skip to content

Commit

Permalink
Fix logging level colors for dark terminals
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentaTomas committed May 1, 2024
1 parent de373d6 commit 9626b6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-peas-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@e2b/cli": patch
---

Fix logging level coloring in dark terminal mode
6 changes: 3 additions & 3 deletions packages/cli/src/commands/sandbox/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ function printLog(timestamp: string, line: string, allowedLevel: LogLevel | unde

switch (level) {
case LogLevel.DEBUG:
level = chalk.default.bgWhite(level)
level = chalk.default.black(chalk.default.bgWhite(level))
break
case LogLevel.INFO:
level = chalk.default.bgGreen(level) + ' '
level = chalk.default.black(chalk.default.bgGreen(level) + ' ')
break
case LogLevel.WARN:
level = chalk.default.bgYellow(level) + ' '
level = chalk.default.black(chalk.default.bgYellow(level) + ' ')
break
case LogLevel.ERROR:
level = chalk.default.white(chalk.default.bgRed(level))
Expand Down

0 comments on commit 9626b6b

Please sign in to comment.