Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axelson/log_viz
https://github.com/axelson/log_viz
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/axelson/log_viz
- Owner: axelson
- Created: 2024-09-11T15:24:20.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T14:07:31.000Z (3 months ago)
- Last Synced: 2024-10-25T17:23:24.413Z (3 months ago)
- Language: Elixir
- Size: 56.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LogViz
**TODO: Add description**
## Installation
Install by adding `log_viz` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:log_viz, github: "axelson/log_viz"},
]
end
```Add log viz to your router (you may want to add it to an admin-only scope)
import LogViz.Router``` elixir
scope "/" do
pipe_through :admin_browser # or whatever pipeline you're using
import LogViz.Router
# ^^^ Add this linelog_viz "/logs"
# ^^^ Add this line
end
```Ensure that you have LiveView setup: https://github.com/phoenixframework/phoenix_live_dashboard?tab=readme-ov-file#2-configure-liveview
LogViz is built on top of RingLogger, so ensure that it is added to your logger backends configuration:
`config :logger, backends: [:console, RingLogger]`Alternatively, you can start it manually at runtime
``` elixir
Logger.add_backend(RingLogger)
Logger.configure_backend(RingLogger, max_size: 1024)
```See the RingLogger readme for full configuration information https://github.com/nerves-project/ring_logger