Closed
Description
Hi, The problem is that when we save logs, logs are no longer displayed in the panel and API
After change config(xray_config.json) like this
"log": {
"loglevel": "info",
"access": "access.log",
"error": "error.log"
},
This is what Api and Panel shows:
Xray 1.8.4 (Xray, Penetrates Everything.) Custom (go1.21.0 linux/amd64)
A unified platform for anti-censorship.
2023/11/22 16:59:16 [Info] infra/conf/serial: Reading config: stdin:
And this is the contents of access.log
file (this is right and ok):
2023/11/22 17:01:32 192.168.1.33:11421 accepted tcp192.168.1.36:443 [VLESS_INBOUND -> proxy] email: 1.Test
2023/11/22 17:01:36 192.168.1.33:11424 accepted tcp192.168.1.36:443 [VLESS_INBOUND -> proxy] email: 1.Test
2023/11/22 17:01:37 192.168.1.33:11430 accepted tcp192.168.1.36:443 [VLESS_INBOUND -> proxy] email: 1.Test
As I can understand when with Xray we save the logs Xray doesn't show them on stdout, so marzban can't catch them.
This is Marzban code to get logs:
...
def capture_only():
while self.process:
output = self.process.stdout.readline()
if output:
output = output.strip()
...
so marzban just read the stdout and when Xray is saving log file, it doesn't send logs into stdout.
I found this out when someone reported it in my script houshmand-2005/V2IpLimit#32
And if we remove the save location to just show the logs like this:
"log": {
"loglevel": "info"
},
Again the logs are sent without any problem.
Do you think something can be done for this?