Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Logger.h@28:4c0d163ba01a, 2019-06-10 (annotated)
- Committer:
- spadaaa
- Date:
- Mon Jun 10 18:30:41 2019 +0000
- Revision:
- 28:4c0d163ba01a
- Parent:
- 12:856286ad4cdc
final test
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| loicguibert | 0:cbc40e6ff273 | 1 | #pragma once |
| loicguibert | 0:cbc40e6ff273 | 2 | |
| loicguibert | 0:cbc40e6ff273 | 3 | #include <mbed.h> |
| loicguibert | 12:856286ad4cdc | 4 | #include <stdint.h> |
| loicguibert | 0:cbc40e6ff273 | 5 | |
| loicguibert | 0:cbc40e6ff273 | 6 | class Logger { |
| loicguibert | 0:cbc40e6ff273 | 7 | public: |
| loicguibert | 0:cbc40e6ff273 | 8 | // constructor |
| loicguibert | 0:cbc40e6ff273 | 9 | Logger(bool logTimestamp); |
| loicguibert | 0:cbc40e6ff273 | 10 | |
| loicguibert | 0:cbc40e6ff273 | 11 | // method called for printing a message, preprended with timestamp information if requested |
| loicguibert | 0:cbc40e6ff273 | 12 | void log(const char * format, ...); |
| loicguibert | 0:cbc40e6ff273 | 13 | |
| loicguibert | 0:cbc40e6ff273 | 14 | private: |
| loicguibert | 12:856286ad4cdc | 15 | // data members |
| loicguibert | 12:856286ad4cdc | 16 | |
| loicguibert | 12:856286ad4cdc | 17 | // gives indication for timestamping |
| loicguibert | 0:cbc40e6ff273 | 18 | bool m_logTimestamp; |
| loicguibert | 0:cbc40e6ff273 | 19 | }; |