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@0:cbc40e6ff273, 2019-02-27 (annotated)
- Committer:
- loicguibert
- Date:
- Wed Feb 27 21:07:55 2019 +0000
- Revision:
- 0:cbc40e6ff273
- Child:
- 9:951b6b0bfdf8
TP01 1st version: logging capacity, switch mode capacity
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 | 0:cbc40e6ff273 | 4 | |
| loicguibert | 0:cbc40e6ff273 | 5 | class Logger { |
| loicguibert | 0:cbc40e6ff273 | 6 | public: |
| loicguibert | 0:cbc40e6ff273 | 7 | // constructor |
| loicguibert | 0:cbc40e6ff273 | 8 | Logger(bool logTimestamp); |
| loicguibert | 0:cbc40e6ff273 | 9 | |
| loicguibert | 0:cbc40e6ff273 | 10 | // method called for printing a message, preprended with timestamp information if requested |
| loicguibert | 0:cbc40e6ff273 | 11 | void log(const char * format, ...); |
| loicguibert | 0:cbc40e6ff273 | 12 | |
| loicguibert | 0:cbc40e6ff273 | 13 | private: |
| loicguibert | 0:cbc40e6ff273 | 14 | bool m_logTimestamp; |
| loicguibert | 0:cbc40e6ff273 | 15 | }; |