tools:logger:start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tools:logger:start [2026/04/13 10:20] – [Multiple Destinations] ursgraf | tools:logger:start [2026/04/13 11:12] (current) – [Adding Output to the SysLog] ursgraf | ||
|---|---|---|---|
| Line 49: | Line 49: | ||
| A log file will be created at the given location. Its file name will be appended with the current date and time of the creation of the file. | A log file will be created at the given location. Its file name will be appended with the current date and time of the creation of the file. | ||
| - | ===== Multiple Destinations | + | ===== Adding Output to the SysLog |
| The simplest way to attach a second sink is via Logger:: | The simplest way to attach a second sink is via Logger:: | ||
| <code cpp> | <code cpp> | ||
| - | Logger:: | + | Logger:: |
| Logger:: | Logger:: | ||
| auto log = Logger:: | auto log = Logger:: | ||
| Line 63: | Line 63: | ||
| <code cpp> | <code cpp> | ||
| + | #include < | ||
| + | |||
| auto multi = std:: | auto multi = std:: | ||
| - | multi-> | + | multi-> |
| multi-> | multi-> | ||
| Logger:: | Logger:: | ||
| + | </ | ||
| + | |||
| + | View the produced log entries in the system log with | ||
| + | <code bash> | ||
| + | $ journalctl -t myLog | ||
| </ | </ | ||
tools/logger/start.1776068427.txt.gz · Last modified: by ursgraf
