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 [2020/11/26 13:06] – [Default LogWriter] ursgraf | tools:logger:start [2026/04/13 11:12] (current) – [Adding Output to the SysLog] ursgraf | ||
|---|---|---|---|
| Line 48: | Line 48: | ||
| </ | </ | ||
| 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. | ||
| + | |||
| + | ===== Adding Output to the SysLog ===== | ||
| + | The simplest way to attach a second sink is via Logger:: | ||
| + | |||
| + | <code cpp> | ||
| + | Logger:: | ||
| + | Logger:: | ||
| + | auto log = Logger:: | ||
| + | log.show(LogLevel:: | ||
| + | </ | ||
| + | |||
| + | Alternatively, | ||
| + | call and hand it to Logger:: | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | |||
| + | auto multi = std:: | ||
| + | multi-> | ||
| + | multi-> | ||
| + | Logger:: | ||
| + | </ | ||
| + | |||
| + | View the produced log entries in the system log with | ||
| + | <code bash> | ||
| + | $ journalctl -t myLog | ||
| + | </ | ||
tools/logger/start.1606392363.txt.gz · Last modified: by ursgraf
