MTProxy
MTProxy copied to clipboard
Logs location are messed up
I'm running mtproxy as a systemd daemon. Here is my systemd service file:
[Service]
Type=simple
User=nobody
Group=nogroup
WorkingDirectory=/etc/mtproxy
ExecStart=/usr/local/bin/mtproxy --slaves 1 --user nobody --address 0.0.0.0 --port 8888 --log /var/log/mtproxy.log --http-ports 1234 --mtproto-secret abcdabcdabcdabcdabcdabcdabcdabcd --aes-pwd /etc/mtproxy/proxy-secret --proxy-tag abababababababababababababababab -v /etc/mtproxy/proxy-multi.conf
[Install]
WantedBy=multi-user.target
Everything is fine, but my /var/log/daemon.log file is getting huge. when i checked it, all mtproxy outputs are there. and there is no /var/log/mtproxy.log file existing.
I don't want mtproxy to output to daemon.log, it should put it's log where stated. what is wrong?
Can confirm too, --log option is not working.
I've checked the mtproto-proxy.c and kprintf.c
This part seems to never execute properly. I'm a newby but logname variable seems to be redefined in kprintf.c and not properly transferred from the params. Will to look futher into this and try to fix myself in my build.
if (logname && (fd = open (logname, O_WRONLY|O_APPEND|O_CREAT, 0640)) != -1) { dup2 (fd, 1); dup2 (fd, 2); if (fd > 2) { close (fd); } }
Same issue here
Have you found the mtproxy. log?Not only does my /var/log/daemon.log file not exist, but my/var/log/mtproxy.log file also does not exist.I also set the --log parameter in my systemd service file.
Same issue here, 2024 :-(