Skip to content

Log Usage Guide

Luke edited this page Jun 29, 2026 · 1 revision

Enable Logging

int main() {
  // Create synchronizer
  Synchronizer synchronizer;
  // Add log prefix and enable logging
  synchronizer.SetLogPath("my-log-");
  ...

If SetLogPath is not configured, no log data is generated by default. SetLogPath can set the minimum log level, such as INFO, WARNING, ERROR, FATAL. The default is INFO.

Generate Logs by Running Synchronizer

cd SimpleSensorSync
mkdir build && cd build
cmake .. && make
cd build/example/NetCam/
./net_cam

Log Download

build/example/NetCam/
├── Makefile
├── my-log-20250728-23-10-31.log
└── net_cam

Where: my-log-20250728-23-10-31.log is the generated log file, with the name generated based on the system time at runtime.

📝 中文页面 (Chinese Page)

Clone this wiki locally