You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/Getting Started.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,35 @@ In this guide we will learn how to install ErrorTracker in an Elixir project so
6
6
7
7
**This guide requires you to have set up Ecto with PostgreSQL, MySQL/MariaDB or SQLite3 beforehand.**
8
8
9
-
## Installing ErrorTracker as a dependency
9
+
## Automatic installation using Igniter
10
+
11
+
The ErrorTracker includes an [igniter](https://hex.pm/packages/igniter) installer that will add the latest version of ErrorTracker to your dependencies before running the installer. Installation will use the application's default Ecto repo and Phoenix router, configure ErrorTracker and create the necessary database migrations. It will basically automate all the installation steps listed in the [manual installation](#manual-installation) section.
12
+
13
+
### If Igniter is already available
14
+
15
+
ErrorTracker may be installed and configured with a single command:
16
+
17
+
```bash
18
+
mix igniter.install error_tracker
19
+
```
20
+
21
+
### If Igniter is not yet available
22
+
23
+
If the `igniter.install` escript is not available. First, add `error_tracker` and `igniter` to your deps in `mix.exs`:
24
+
25
+
```elixir
26
+
{:error_tracker, "~> 0.6"},
27
+
{:igniter, "~> 0.5", only: [:dev]},
28
+
```
29
+
30
+
Run `mix deps.get` to fetch the dependencies, then run the install task:
31
+
32
+
```bash
33
+
mix error_tracker.install
34
+
```
35
+
36
+
37
+
## Manual Installation
10
38
11
39
The first step to add ErrorTracker to your application is to declare the package as a dependency in your `mix.exs` file:
12
40
@@ -25,7 +53,7 @@ Once ErrorTracker is declared as a dependency of your application, you can insta
25
53
mix deps.get
26
54
```
27
55
28
-
## Configuring ErrorTracker
56
+
###Configuring ErrorTracker
29
57
30
58
ErrorTracker needs a few configuration options to work. This configuration should be added to your `config/config.exs` file:
31
59
@@ -42,7 +70,7 @@ The `:otp_app` option specifies your application name. When an error occurs, Err
42
70
43
71
The `:enabled` option (defaults to `true` if not present) allows to disable the ErrorTracker on certain environments. This is useful to avoid filling your dev database with errors, for example.
44
72
45
-
## Setting up the database
73
+
###Setting up the database
46
74
47
75
Since ErrorTracker stores errors in the database you must create a database migration to add the required tables:
0 commit comments