Skip to content

Commit 792f1a6

Browse files
committed
1 parent 25a4381 commit 792f1a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ A modern, ROS 2 logging library that provides fmt-style formatting as a replacem
88

99
- Function calls instead of macros: `logger.info("Hello, {}!", name)` instead of `RCLCPP_INFO(logger, "Hello, %s", name.c_str())`
1010
- Additional `.on_change()` method for logging changes in values
11-
- chrono syntax for throttling: `logger.warn_throttle(1s, "Warning: {}", value)`
11+
- Chrono syntax for throttling: `logger.warn_throttle(1s, "Warning: {}", value)`
12+
- Backwards compatible with the macros, so easy to start using in existing projects without a full rewrite of the current log statements
1213

1314
## Examples
1415

@@ -88,7 +89,7 @@ logger.info("Hello, {}!", name);
8889
logger.info("Processing {1} of {0} items", total, current);
8990

9091
// Format specifiers
91-
logger.info("Progress: {:.1%}", progress); // Percentage with 1 decimal
92+
logger.info("Progress: {:.1}%", progress); // Percentage with 1 decimal
9293
logger.info("Value: {:08.2f}", value); // Zero-padded floating point
9394
logger.info("Hex: {:#x}", number); // Hexadecimal with 0x prefix
9495

0 commit comments

Comments
 (0)