mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 06:40:05 +00:00
AK: Display SourceLocation function name in color
It's much easier to spot the function name (which is what you often expect) like this.
This commit is contained in:
parent
b3c18db463
commit
2a1a619eed
Notes:
sideshowbarker
2024-07-17 16:36:28 +09:00
Author: https://github.com/alimpfard
Commit: 2a1a619eed
Pull-request: https://github.com/SerenityOS/serenity/pull/13310
Reviewed-by: https://github.com/IdanHo
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ template<>
|
||||||
struct AK::Formatter<AK::SourceLocation> : AK::Formatter<FormatString> {
|
struct AK::Formatter<AK::SourceLocation> : AK::Formatter<FormatString> {
|
||||||
ErrorOr<void> format(FormatBuilder& builder, AK::SourceLocation location)
|
ErrorOr<void> format(FormatBuilder& builder, AK::SourceLocation location)
|
||||||
{
|
{
|
||||||
return AK::Formatter<FormatString>::format(builder, "[{} @ {}:{}]", location.function_name(), location.filename(), location.line_number());
|
return AK::Formatter<FormatString>::format(builder, "[\x1b[34m{}\x1b[0m @ {}:{}]", location.function_name(), location.filename(), location.line_number());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue