Files
directus/api
ian 6c6977c062 Implement logs websocket (#23016)
* Implement logs websocket

* Update docs

* Remove commented test code

* fixed controller shared logic

* fixed controller type

* Added shutdown callback

* Expose allowed log levels

* Use a different event

* Add log level filtering

* Return log_level when subscribed

* Remove unused import

* Limit logs websocket to `strict` auth mode (#23023)

* simplify logging handler

* enforce strict mode

* Update logs handler

* Update docs

---------

Co-authored-by: ian <licitdev@gmail.com>

* Add unique nodeId as uid

* Create logStream only when required

* Add admin requirement check

* Extract isValidLogLevel as util

* Remove authentication and path from server info

* Remove hostname and pid from logs if not raw

* Fix nodeId implementation

* Support custom log levels

* Fix build

* Fix test

* Remove unused constants and util

* Display websocket logs details in server info for admins only

* Expose log level value in server info

* Stream raw logs to websocket

* Retain hostname and pid field in raw logs

* Add separate env var for logs streaming

* Reset attempts after reconnection failure

* Remove obsolete accountability refreshing

* Run handler only when enabled

* Add changeset

* Allow wss protocol

* Rename to logs-stream

* Add unit tests

* Add explicit check for the remaining client

* Updated json stringification in log-streaming

* prettier

---------

Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
2024-08-29 10:01:35 -04:00
..
2024-08-29 10:01:35 -04:00