Skip to content

Commit

Permalink
💄 (logger): Use __FUNCTION__ for cleaner output
Browse files Browse the repository at this point in the history
Previously we used __PRETTY_FUNCTION__ which outputs too many
details with the function signature
  • Loading branch information
ladislas committed May 5, 2021
1 parent f660b3d commit d05733d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/LogKit/include/LogKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct logger {
do { \
leka::logger::mutex.lock(); \
leka::logger::format_time_human_readable(leka::logger::now()); \
leka::logger::format_filename_line_function(__FILENAME__, __LINE__, __PRETTY_FUNCTION__); \
leka::logger::format_filename_line_function(__FILENAME__, __LINE__, __FUNCTION__); \
leka::logger::format_message(str, ##__VA_ARGS__); \
auto length = \
leka::logger::format_output("%s %s %s %s\n", leka::logger::buffer::timestamp.data(), \
Expand All @@ -159,7 +159,7 @@ struct logger {
do { \
leka::logger::mutex.lock(); \
leka::logger::format_time_human_readable(leka::logger::now()); \
leka::logger::format_filename_line_function(__FILENAME__, __LINE__, __PRETTY_FUNCTION__); \
leka::logger::format_filename_line_function(__FILENAME__, __LINE__, __FUNCTION__); \
leka::logger::format_message(str, ##__VA_ARGS__); \
auto length = \
leka::logger::format_output("%s %s %s %s\n", leka::logger::buffer::timestamp.data(), \
Expand All @@ -173,7 +173,7 @@ struct logger {
do { \
leka::logger::mutex.lock(); \
leka::logger::format_time_human_readable(leka::logger::now()); \
leka::logger::format_filename_line_function(__FILENAME__, __LINE__, __PRETTY_FUNCTION__); \
leka::logger::format_filename_line_function(__FILENAME__, __LINE__, __FUNCTION__); \
leka::logger::format_message(str, ##__VA_ARGS__); \
auto length = \
leka::logger::format_output("%s %s %s %s\n", leka::logger::buffer::timestamp.data(), \
Expand Down

0 comments on commit d05733d

Please sign in to comment.