Bug 5936 - XML-RPC errors from the client are not sent to log file
Summary: XML-RPC errors from the client are not sent to log file
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: pre-1.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.16.0
Assignee: Samuel Mannehed
URL:
Keywords: adaha_tester, prosaic
Depends on:
Blocks:
 
Reported: 2016-06-13 11:01 CEST by Pierre Ossman
Modified: 2024-01-05 10:00 CET (History)
3 users (show)

See Also:
Acceptance Criteria:
MUST: * Errors from xmlrpc++ should be sent to the tlclient log file. SHOULD: * No unnecessary log messages from xmlrpc++ should be sent to the tlclient log file. * Errors from xmlrpc++ should end up on the appropriate log level in the tlclient log.


Attachments

Description Pierre Ossman cendio 2016-06-13 11:01:24 CEST
xmlrpc++ sends its logging to stdout rather than our log file, which means that we can lose crucial error messages and warnings.
Comment 1 Henrik Andersson cendio 2016-06-20 14:41:13 CEST
Created attachment 721 [details]
Patch for redirecting XmlRpc log to tlclient logfile.
Comment 3 Samuel Mannehed cendio 2024-01-04 16:08:36 CET
Fixed now. Tested on Fedora 39, Windows 10 and macOS 13.

I broke /opt/thinlinc/libexec/thinlinc-login on my server and tried logging in. Errors from XmlRpc++ now appear in the ThinLinc client log file, only when debug logging is enabled.

With default log level:

> 2024-01-04T15:39:58: Calling XML-RPC method 'get_capabilities'
> 2024-01-04T15:39:58: Call to XML-RPC method 'get_capabilities' failed
With `-d5`:

> 2024-01-04T15:38:12: Calling XML-RPC method 'get_capabilities'
> 2024-01-04T15:38:12: Error in XmlRpcClient::writeRequest: write error (error 9).
> 2024-01-04T15:38:12: Call to XML-RPC method 'get_capabilities' failed

Acceptance criteria are all fulfilled:

> MUST:
> 
> * Errors from xmlrpc++ should be sent to the tlclient log file.
Yes.

> SHOULD:
> 
> * No unnecessary log messages from xmlrpc++ should be sent to the tlclient log file.
We ignore everything but errors.

> * Errors from xmlrpc++ should end up on the appropriate log level in the tlclient log.
They are logged on level 4, i.e., are not shown by default.
Comment 4 Adam Halim cendio 2024-01-05 10:00:16 CET
Tested on Fedora 38, Windows 10 and macOS 14.1.1.

Default log level:
> 2024-01-05T09:52:56: Calling XML-RPC method 'get_capabilities'
> 2024-01-05T09:52:56: Call to XML-RPC method 'get_capabilities' failed
With -d4:
> 2024-01-05T09:53:50: Calling XML-RPC method 'get_capabilities'
> 2024-01-05T09:53:50: Error in XmlRpcClient::writeRequest: write error (error 9).
> 2024-01-05T09:53:50: Call to XML-RPC method 'get_capabilities' failed
Acceptance criteria:
> MUST:
> 
> * Errors from xmlrpc++ should be sent to the tlclient log file. ✅
Indeed, error are configured to be redirected at the same time as the logfile is created.

> SHOULD:
> 
> * No unnecessary log messages from xmlrpc++ should be sent to the tlclient log file. ✅
> * Errors from xmlrpc++ should end up on the appropriate log level in the tlclient log. ✅
All log messages are ignored, and errors are only logged at -d4 or above.

Code looks good, closing.

Note You need to log in before you can comment on or make changes to this bug.