Logging of Desktop Client for Windows

How can I enable logging of Desktop Client for Windows?
The option -l LOG_LEVEL is not enough for that.
And how can I set the location of log-files?

Indeed before we were using py2exe which write the stderr to a log file automatically.
Since we migrated to cx_freeze, it does not do it anymore (see https://bitbucket.org/anthony_tuininga/cx_freeze/issues/60/python-333-freeze_support and https://stackoverflow.com/questions/38404800/cx-freeze-doesnt-print-to-console).
I think we should add an option to tryton to define a logging file. This could be done by passing a filename argument to logging.basicConfig.

I filled Issue 8915: Add logging file option - Tryton issue tracker

I have enabled logging with logging.basicConfig and have built Desktop Client for Windows.

When calling the Client I received the message:

INFO:tryton.translate:Unable to set locale English_USA.cp1251

When leaving the Client the following messages appear:

WARNING:tryton.gui.window.view_form.screen.screen:Unable to set view tree state
Traceback (most recent call last):
  File "D:\msys32\home\bell\tryton/tryton/gui/window/view_form/screen/screen.py", line 856, in save_tree_state
  File "D:\msys32\home\bell\tryton/tryton/common/common.py", line 1065, in RPCExecute
    return RPCProgress('execute', args).run(process_exception, callback)
  File "D:\msys32\home\bell\tryton/tryton/common/common.py", line 1030, in run
    return self.process()
  File "D:\msys32\home\bell\tryton/tryton/common/common.py", line 1055, in process
    return return_()
  File "D:\msys32\home\bell\tryton/tryton/common/common.py", line 1048, in return_
    raise self.exception
  File "D:\msys32\home\bell\tryton/tryton/common/common.py", line 999, in start
    self.res = getattr(rpc, self.method)(*self.args)
  File "D:\msys32\home\bell\tryton/tryton/rpc.py", line 129, in execute
    return _execute(True, *args)
  File "D:\msys32\home\bell\tryton/tryton/rpc.py", line 115, in _execute
    raise TrytonServerError('403')
tryton.jsonrpc.Fault: 403

What do these messages mean?

So after all, are these Tryton Client bugs or is there something wrong with our settings?

It is not very important. It seems like saving the tree state is called after the logout. This is an case expected as we catch such error. On my test, depending on how the client is closed, the on_quit method can be called twice, I think it is for the quit action and the destroy event.