mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Removed exception log and added base for allow client logs upload
This commit is contained in:
parent
beea237758
commit
a8f77a05de
@ -811,7 +811,7 @@ class Unmanaged(ActorV3Action):
|
||||
dbservice = Service.objects.get(token=token)
|
||||
service: 'services.Service' = dbservice.get_instance()
|
||||
except Exception:
|
||||
logger.exception('Unmanaged host request: %s', self._params)
|
||||
logger.warning('Unmanaged host request: %s', self._params)
|
||||
return ActorV3Action.actor_result(error='Invalid token')
|
||||
|
||||
# ensure idsLists has upper and lower versions for case sensitive databases
|
||||
|
@ -234,15 +234,16 @@ class Client(Handler):
|
||||
|
||||
log: str = self._params.get('log', '')
|
||||
# Right now, log to logger, but will be stored with user logs
|
||||
logger.info('Client %s: %s', self._request.user.pretty_name, userservice.service_pool.name)
|
||||
for line in log.split('\n'):
|
||||
# Firt word is level
|
||||
try:
|
||||
level, message = line.split(' ', 1)
|
||||
userservice.log(message, LogLevel.from_str(level), LogSource.CLIENT)
|
||||
logger.info('Client %s: %s', self._request.user.pretty_name, message)
|
||||
except Exception:
|
||||
# If something goes wrong, log it as debug
|
||||
pass
|
||||
# logger.info('Client log for %s: %s', self._request.user.pretty_name, line)
|
||||
case _:
|
||||
return Client.result(error='Invalid command')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user