An open API service indexing awesome lists of open source software.

https://github.com/alisinabh/live_dashboard_logger

A real-time log page for Phoenix Live Dashboard with multi-node support
https://github.com/alisinabh/live_dashboard_logger

elixir-liveview elixir-logger liveview logging phoenix-liveview

Last synced: 12 months ago
JSON representation

A real-time log page for Phoenix Live Dashboard with multi-node support

Awesome Lists containing this project

README

          

# LiveDashboard Logger

LiveDashboard Logger adds real-time log viewing capabilities to [Phoenix Live Dashboard](https://github.com/phoenixframework/phoenix_live_dashboard) through a custom logger backend. This allows you to monitor your application's logs directly from your dashboard, making debugging and monitoring easier.

## Demo Screenshot

![Live Logger Dashboard Screenshot](assets/live-logger-dashboard-screenshot.png)

## Features

- Real-time log streaming in Phoenix Live Dashboard
- Supports multi-node setups
- Clean integration with existing Phoenix Live Dashboard setup
- Minimal performance overhead

## Installation

1. Add `:live_dashboard_logger` to your dependencies in `mix.exs`:

```elixir
# mix.exs
def deps do
[
{:live_dashboard_logger, "~> 0.0.1"}
]
end
```

2. Add the `LiveDashboardLogger` page to your Phoenix Live Dashboard configuration in your router:

```elixir
# lib/your_app_web/router.ex
live_dashboard "/dashboard",
metrics: YourAppWeb.Telemetry,
additional_pages: [
live_logs: LiveDashboardLogger
],
on_mount: [
LiveDashboardLogger.Hooks
]
```

## Usage

Once installed, you'll find a new "Live Logs" page in your Phoenix Live Dashboard.
The page displays incoming logs in real-time.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE.md](/LICENSE.md) file for details.