File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -36,15 +36,17 @@ defmodule ServerUtils.SentryLogger do
36
36
37
37
Returns `:ok` or an `{:error, reason}` tuple.
38
38
39
- Returns a [Task](https://hexdocs.pm/elixir/Task.html#content) struct is Sentry is **enabled**.
39
+ Returns a [Task](https://hexdocs.pm/elixir/Task.html#content) struct if Sentry is **enabled**.
40
40
"""
41
41
@ spec warn ( String . t ( ) ) :: atom ( ) | Task . t ( )
42
42
def warn ( message ) do
43
43
if System . get_env ( "DISABLE_SENTRY" ) do
44
44
Logger . warn ( fn -> message end )
45
45
else
46
46
opts = [
47
- environment: System . get_env ( "ENVIRONMENT" ) ,
47
+ tags: % {
48
+ environment: System . get_env ( "ENVIRONMENT" )
49
+ } ,
48
50
level: "warning"
49
51
]
50
52
@@ -61,15 +63,17 @@ defmodule ServerUtils.SentryLogger do
61
63
62
64
Returns `:ok` or an `{:error, reason}` tuple if Sentry is **disabled**.
63
65
64
- Returns a [Task](https://hexdocs.pm/elixir/Task.html#content) struct is Sentry is **enabled**.
66
+ Returns a [Task](https://hexdocs.pm/elixir/Task.html#content) struct if Sentry is **enabled**.
65
67
"""
66
68
@ spec error ( String . t ( ) ) :: atom ( ) | Task . t ( )
67
69
def error ( message ) do
68
70
if System . get_env ( "DISABLE_SENTRY" ) do
69
71
Logger . error ( fn -> message end )
70
72
else
71
73
opts = [
72
- environment: System . get_env ( "ENVIRONMENT" ) ,
74
+ tags: % {
75
+ environment: System . get_env ( "ENVIRONMENT" )
76
+ } ,
73
77
level: "error"
74
78
]
75
79
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ defmodule ServerUtils.Mixfile do
2
2
@ moduledoc false
3
3
use Mix.Project
4
4
5
- @ version "0.2.3 "
5
+ @ version "0.2.4 "
6
6
7
7
def project do
8
8
[
You can’t perform that action at this time.
0 commit comments