mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -06:00
Added connected pgAdmin user and connection name in the log file. Fixes #5452
Patch By: Nico T
This commit is contained in:
parent
0620fafb6c
commit
c0451cd454
@ -9,6 +9,7 @@ This release contains a number of bug fixes and new features since the release o
|
||||
New features
|
||||
************
|
||||
|
||||
| `Issue #5452 <https://redmine.postgresql.org/issues/5452>`_ - Added connected pgAdmin user and connection name in the log file.
|
||||
| `Issue #5489 <https://redmine.postgresql.org/issues/5489>`_ - Show the startup log as well as the server log in the runtime's log viewer.
|
||||
|
||||
Housekeeping
|
||||
|
@ -918,10 +918,16 @@ WHERE
|
||||
|
||||
query = query.encode(encoding)
|
||||
|
||||
dsn = self.conn.get_dsn_parameters()
|
||||
current_app.logger.log(
|
||||
25,
|
||||
u"Execute (async) for server #{server_id} - {conn_id} (Query-id: "
|
||||
u"Execute (async) by {pga_user} on {db_user}@{db_host}/{db_name} "
|
||||
u"#{server_id} - {conn_id} (Query-id: "
|
||||
u"{query_id}):\n{query}".format(
|
||||
pga_user=current_user.email,
|
||||
db_user=dsn['user'],
|
||||
db_host=dsn['host'],
|
||||
db_name=dsn['dbname'],
|
||||
server_id=self.manager.sid,
|
||||
conn_id=self.conn_id,
|
||||
query=query.decode(encoding),
|
||||
|
Loading…
Reference in New Issue
Block a user