FastLED 3.10.8
Loading...
Searching...
No Matches

◆ log_emit_prefix()

void fl::detail::log_emit_prefix ( log_kind kind,
const char * file,
int line )

Definition at line 26 of file log.cpp.hpp.

27 {
28 char digits[12]; // "-2147483648" + NUL
29 char* p = digits + sizeof(digits);
30 *--p = '\0';
31 unsigned magnitude = line < 0 ? 0u - static_cast<unsigned>(line)
32 : static_cast<unsigned>(line);
33 do {
34 *--p = static_cast<char>('0' + magnitude % 10u);
35 magnitude /= 10u;
36 } while (magnitude != 0u);
37 if (line < 0) {
38 *--p = '-';
39 }
40 fl::print(file);
41 fl::print("(");
42 fl::print(p);
43 fl::print("): ");
45 fl::print(": ");
46}
FL_NO_INLINE const char * log_kind_name(log_kind kind) FL_NO_EXCEPT
Definition log.cpp.hpp:13
void print(const char *str) FL_NO_EXCEPT
constexpr int numeric_limits< char >::digits

References fl::FL_NO_EXCEPT, FL_NO_INLINE, log_kind_name(), fl::numeric_limits< char >::digits, and fl::print().

Referenced by log_emit_literal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: