How to set loraserver log file


#1

I have developed a lora gateway, and intergraded lora server in this device. This device is embed ARM and run a embed linux , It can work well.

Because I want let all debug information out to a log file, So start the lora-gateway-bridge use command:

./lora-gateway-bridge >>/tmp/lora-gateway-bridge.log &

The task can run exactly, but log file not create, and debug information still print in screen.

root@am335x-evm:~/lora/lora-gateway-bridge/build# ./lora-gateway-bridge >>/tmp/lora-gateway-bridge.log &

[4] 2259
root@am335x-evm:~/lora/lora-gateway-bridge/build# INFO[0000] starting LoRa Gateway Bridge docs="h=2.6.2-5-g8b51594
INFO[0000] backend: set max reconnect interval: 10m0s
INFO[0000] backend: TLS config is empty
INFO[0000] backend: connecting to mqtt broker server=“tcp://127.0.0.1:1883”
INFO[0000] gateway: starting gateway udp listener addr=“0.0.0.0:1700”
INFO[0000] backend: connected to mqtt broker

How can I let debug information to a log file?


#2

I resolve it, because loraserver use logrus as log tool .The logrus use std error as default print,so command must as :
./lora-gateway-bridge 2>>/tmp/lora-gateway-bridge.log &