...
Managing automatic purging of these logs is performed using the settings: keep_extended_logs_max_days, extended_logs_dir_depth, check_extended_logs_interval. By default, check for outdated logs is performed every 24 hours and all logs older than 30 days are deleted. To modify client logs storage and deletion rules, edit these settings and restart the WCS server.
Logging level managing "on the fly"
Logging level for certain session may be changed on the go, without server restart. To do this, REST queries are used
REST query should be HTTP/HTTPS POST request such as:
- HTTP: http://test.flashphoner.com:8081/rest-api/logger/enable_client_log
- HTTPS: https://test.flashphoner.com:8444/rest-api/logger/enable_client_log
Here:
- test.flashphoner.com is WCS server address
- 8081 is WCS standard REST / HTTP port
- 8444 is WCS standard HTTPS port
- rest-api is required URL prefix
- /logger/enable_client_log is REST method used
REST methods and response statuses
REST method | Example of REST request | Example of REST response | Response status | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
/logger/enable_client_log |
| 200 - Logging level is changed 404 - Session not found | Set the logging level specified in session specified | ||||||||
/logger/disable_client_log |
| 200 - Logging is disabled 404 - Session not found | Fully disable logging in session specified |
Parameters
Parameter name | Description | Example |
---|---|---|
sessionId | Session Id | /127.0.0.1:57539/192.168.1.101:8443 |
logLevel | Logging level to set | DEBUG |
Thus, when problem occurs with stream published on server (for example, the stream is published but cannot be played), REST query should be sent to server to switch logging level to DEBUG and then, when problem is reproduced and data are collected, to switch logging level back to INFO. Also it is possible to switch logging off in certain client session.
Logging level changes with REST queries affects only the session specified, but not another sessions including sessions that will be created later.
Client log structure and content
Client logs structure:
Code Block | ||||
---|---|---|---|---|
| ||||
client_logs ---- 2018-05-16 -------- 84gij60a6u3ni7docsr1di1l5b-15-06-59 ------------ flashphoner.log ------------ client-84gij60a6u3ni7docsr1di1l5b-2018.05.16.15.07.26-1526458046646.report ------------ MediaDump-85d65b00-639e-4a7e.31002-31004-31006-31008.pcap |
flashphoner.log log
Client logs are recorded to client_logs by dates. For each date, a directory is created with the name formatted as YYYY-MM-DD, for instance, 2018-05-16.
When the web client establishes connection to the server, a folder for the current client session is created inside the date folder, for example, 84gij60a6u3ni7docsr1di1l5b-15-06-59, where 84gij60a6u3ni7docsr1di1l5b is a session identifier, 15 is hours, 06 is minutes, 59 is seconds. In the same directory the flashphoner.log file is recorded, which contains only those server events that are relevant to this specific client session. Hence, we see when the client connected to the server, and what logs were recorded for this client's session.
client-report log
This is an additional client log. The web client has a special WCS JavaScript API function 'pushLog'. This function sends to the WCS server logs recorded on the browser side. All logs received from the web client using pushLog are saved on the server. When the web client ends a session with the WCS server, the received logs are recorded to the client-84gij60a6u3ni7docsr1di1l5b-2018.05.16.15.07.26-1526458046646.report file, where 84gij60a6u3ni7docsr1di1l5b is a session identifier, 2018 is year, 05 is month, 26 is day, 15 is hours, 07 is minutes, 26 is seconds, 1526458046646 is milliseconds.
Media traffic dumps
If in the flashphoner.properties settings file a non-zero value is set for the client_dump_level setting, a dump session is additionally recorded for a client:
...