cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
433 stars 60 forks source link

KobaltLogger oddities #420

Closed ethauvin closed 7 years ago

ethauvin commented 7 years ago

warn(message, e)

If one goes through the effort of specified both a message and exception, shouldn't that message be displayed to the user? The exception message will be displayed in the stacktrace.

I guess that applies to error too.

Additionally, have you considered using yellow instead of red for warnings?

cbeust commented 7 years ago

You're welcome to fix KobaltLogger, I'm not very happy with its current shape.

Include screenshots with your changes once you send the PR so I can get an idea of what it looks like.

Also, the latest Maven is using some colors, might be worth checking it out and see if there's anything we could reuse.

cbeust commented 7 years ago

FYI, I initially used yellow for warnings but it produced poor results in some of the consoles I use, which have a yellowish background:

image

The problem with colors is getting them to work with both consoles with a dark and a light background, you'll have to test your experiments with both.

ethauvin commented 7 years ago

I'll look into Maven, but what about using bold for warnings, that works regardless of the console colors?

cbeust commented 7 years ago

Bold sounds fine.

On Apr 21, 2017 2:49 PM, "Erik C. Thauvin" notifications@github.com wrote:

I'll look into Maven, but what about using bold for warnings, that works regardless of the console colors?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cbeust/kobalt/issues/420#issuecomment-296313409, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFoouheNKX949CFi-Vl0K5c_TlmLu5qks5rySRMgaJpZM4NBZh7 .

ethauvin commented 7 years ago

Bold is a bust. Bold is basically a highlight, and the messages are already highlighted.

I'll look at Maven, but from what I've read, the best solution is to also control the background color, which is quite doable.

cbeust commented 7 years ago

Sure, you can specify the background and the foreground, the hard part is to make it look good with the color scheme of the console...

ethauvin commented 7 years ago

We could use red on black for errors, and yellow on black for warnings. It'll look like a highlight on non-black consoles.

ethauvin commented 7 years ago

Maven uses: https://github.com/fusesource/jansi for color, and it doesn't address any of the issues above.