要將 Log 寫入 LogDevice,需要用 echo 輸出要寫入的 data,用 Pipline 將之帶入 ldwrite,並指定設定檔位置,以及要寫入的位置即可。

echo | ldwrite

像這邊筆者就將 hello 這樣的資料寫到了 LogDevice 的第一個位置。

1.png