Skip to content

Commit 5613c2e

Browse files
committed
added return values to the Logger macro's documentation
1 parent 6cba4f3 commit 5613c2e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/logger/lib/logger.ex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@ defmodule Logger do
468468
@doc """
469469
Logs a warning.
470470
471+
Returns the atom `:ok` or an `{:error, reason}` tuple.
472+
471473
## Examples
472474
473475
Logger.warn "knob turned too far to the right"
@@ -481,6 +483,8 @@ defmodule Logger do
481483
@doc """
482484
Logs some info.
483485
486+
Returns the atom `:ok` or an `{:error, reason}` tuple.
487+
484488
## Examples
485489
486490
Logger.info "mission accomplished"
@@ -494,6 +498,8 @@ defmodule Logger do
494498
@doc """
495499
Logs an error.
496500
501+
Returns the atom `:ok` or an `{:error, reason}` tuple.
502+
497503
## Examples
498504
499505
Logger.error "oops"
@@ -506,6 +512,8 @@ defmodule Logger do
506512

507513
@doc """
508514
Logs a debug message.
515+
516+
Returns the atom `:ok` or an `{:error, reason}` tuple.
509517
510518
## Examples
511519
@@ -519,6 +527,8 @@ defmodule Logger do
519527

520528
@doc """
521529
Logs a message.
530+
531+
Returns the atom `:ok` or an `{:error, reason}` tuple.
522532
523533
Developers should use the macros `Logger.debug/2`,
524534
`Logger.warn/2`, `Logger.info/2` or `Logger.error/2` instead

0 commit comments

Comments
 (0)