Colors and Special Text Effects in Go Logs: Difference between revisions
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | =External= | ||
* https://www.baeldung.com/java-log-console-in-color | * https://www.baeldung.com/java-log-console-in-color | ||
* https://github.com/bit101/go-ansi | |||
* https://codehs.com/tutorial/andy/ansi-colors | |||
=Internal= | =Internal= | ||
* [[Go_Logging#Subjects|Go Logging]] | * [[Go_Logging#Subjects|Go Logging]] | ||
Line 6: | Line 9: | ||
=Overview= | =Overview= | ||
Text effects: | |||
* Red: <code>\u001B[31m</code> | |||
* Blue: <code>\u001B[34m</code> | |||
* Green: <code>\u001B[32m</code> | |||
* Black: <code>\u001B[30m</code> | |||
* Yellow: <code>\u001B[33m</code> | |||
* Purple: <code>\u001B[35m</code> | |||
* Cyan: <code>\u001B[36m</code> | |||
* White: <code>\u001B[37m</code> | |||
* Bold: <code>\u001B[1m</code> | |||
End text effect: <code>\u001B[0m</code>. | |||
To combine effects: <code>"\u001B[31m\u001B[1m ..... \u001B[0m"</code>. |
Latest revision as of 22:09, 5 January 2024
External
- https://www.baeldung.com/java-log-console-in-color
- https://github.com/bit101/go-ansi
- https://codehs.com/tutorial/andy/ansi-colors
Internal
Overview
Text effects:
- Red:
\u001B[31m
- Blue:
\u001B[34m
- Green:
\u001B[32m
- Black:
\u001B[30m
- Yellow:
\u001B[33m
- Purple:
\u001B[35m
- Cyan:
\u001B[36m
- White:
\u001B[37m
- Bold:
\u001B[1m
End text effect: \u001B[0m
.
To combine effects: "\u001B[31m\u001B[1m ..... \u001B[0m"
.