MTProxy icon indicating copy to clipboard operation
MTProxy copied to clipboard

Logs location are messed up

Open euphoria360 opened this issue 7 years ago • 5 comments

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?

euphoria360 avatar Jun 15 '18 12:06 euphoria360

Can confirm too, --log option is not working.

rockenren avatar Jun 17 '18 10:06 rockenren

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); } }

JackMall avatar Oct 11 '18 10:10 JackMall

Same issue here

lucidyan avatar May 16 '19 17:05 lucidyan

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.

zhangqingfeng0105 avatar Sep 27 '20 09:09 zhangqingfeng0105

Same issue here, 2024 :-(

Alojalia avatar Mar 23 '24 14:03 Alojalia