José Valim
f524f25c58
Require Erlang 18.0 forward
2015-09-25 12:01:10 +02:00
Aleksei Magusev
b7b7a579fc
Cut off "Elixir." prefix for modules in Logger metadata
2015-08-25 15:43:20 +02:00
Aleksei Magusev
280b6502df
Do not inject :application key in metadata if it has nil value
2015-08-25 15:33:53 +02:00
James Fish
4d69404bfe
Add application to logger metadata
2015-08-13 11:24:52 +01:00
José Valim
a874869a0e
Support translator_inspect_opts
...
This allow developers to configure how state and message
are formatted when translating OTP errors and reports.
Closes #2880
2015-08-10 15:33:21 +02:00
Aleksei Magusev
8eb29e2527
Preserve metadata order defined in the backend's configuration
2015-07-20 22:12:38 +02:00
Aleksei Magusev
d6bb79ae92
Ensure Logger metadata is merged on log call
2015-07-20 21:46:50 +02:00
Aleksei Magusev
1702cda8b2
Allow Logger metadata removal from the pdict
2015-07-20 21:42:09 +02:00
Aleksei Magusev
bd9fde4770
Make Logger.log/3 macro and introduce Logger.bare_log/3 instead
2015-07-12 23:38:00 +02:00
José Valim
96381e43b6
Merge pull request #3390 from lexmag/opportunistic-logging-pr
...
Opportunistic logging, `Logger.CaptureLog` and more
2015-06-30 12:28:06 +02:00
Aleksei Magusev
6395775a60
Get rid of ProxyIO and merge :console and :capture backends
2015-06-25 14:46:49 +02:00
James Fish
20e2f133d7
Translate emulator logged process crashes in 18.0+
2015-06-25 11:55:02 +01:00
James Fish
c6203f0b16
Fix unused variable warning in logger test
2015-06-25 11:52:36 +01:00
José Valim
e505645a75
Move tests to Erlang 18 which has proper logger behaviour
2015-06-25 13:00:53 +02:00
Aleksei Magusev
14b5767167
Add support for :capture_log ExUnit test tagging
2015-06-24 23:48:03 +02:00
Aleksei Magusev
589c1e55aa
Rename Logger.CaptureLog to ExUnit.CaptureLog
2015-06-24 23:48:03 +02:00
Aleksei Magusev
ebfad24553
Add tests for Logger.Backends.Capture
2015-06-24 23:48:02 +02:00
Aleksei Magusev
3a1f97aa86
Introduce Logger.CLIFormatter
2015-06-24 23:48:02 +02:00
Aleksei Magusev
86e2ca4023
Introduce Logger.CaptureLog
2015-06-24 23:48:02 +02:00
James Fish
6cd1478a2e
Move terminate reason to second line in logs
...
With default settings logger could truncate the log before the
terminate reason if there is a large term beforehand, such as a large
message in a GenServer termination report. Therefore move terminate
reason (the most important information) as near the front of the
message as possible so that as little of it as possible is truncated.
2015-06-20 01:26:56 +01:00
James Fish
e25f20fd21
Really fix race condition in logger translator test
2015-06-08 12:00:51 +01:00
James Fish
00dc365a66
Fix race condition in logger translator test
2015-06-07 22:01:44 +01:00
Alexei Sholik
02f9d8a724
Handle :undefined in Exception.format_arity/1
...
We get :undefined when a temporary worker of a simple_one_for_one
supervisor crashes.
Thanks to @fishcakez for feedback
2015-06-07 14:59:01 +03:00
Martin Schürrer
6246d0043f
Support printing pids and refs in Logger metadata.
2015-05-18 18:42:32 +02:00
eksperimental
61675c3ea8
Add space after comma: Format consistently
2015-03-17 22:55:27 +07:00
José Valim
16f0b927c6
Merge pull request #3062 from fishcakez/logger_format_stop
...
Handle OTP 17.4 error_logger terminate reasons
2015-02-17 19:29:10 +01:00
James Fish
c2f04a6b54
Update logger translator tests for OTP 17.4 format
2015-02-15 19:42:47 +00:00
James Fish
be3150bb80
Logger uses chardata, not iodata
2015-02-10 21:07:01 +00:00
James Fish
6518df39d0
Fix race condition in undef logger translator tests
2015-01-30 20:44:53 +00:00
José Valim
c80b211445
Merge pull request #2801 from fishcakez/app_env
...
Move application state out of application env
Conflicts:
lib/elixir/lib/uri.ex
lib/iex/lib/iex/server.ex
2015-01-24 14:07:46 +01:00
Aleksei Magusev
f59175feae
Use actual message in the metadata assertion
2015-01-21 02:44:48 +01:00
Aleksei Magusev
1a3bca6726
Add test for metadata defaults
2015-01-21 02:44:48 +01:00
José Valim
19868cd286
Merge pull request #2762 from fishcakez/undef_errors
...
Improve UndefinedFunctionError
2015-01-15 15:15:50 +01:00
James Fish
8b8e7801a6
Improve UndefinedFunctionError
...
* Detect undefined errors for compiling modules
* Log undefined errors in Task's like other OTP processes
* Normalize undefined errors from OTP processes
2014-09-10 15:06:32 +01:00
José Valim
a5b4c1c04d
Document and test Logger functions return :ok
2014-09-09 16:58:48 +02:00
José Valim
9e74ee686e
Add Logger.enable/1 and Logger.disable/1
2014-09-09 16:54:02 +02:00
José Valim
598e42e00b
Tidy up GenEvent docs and test suite
2014-09-05 13:34:26 +02:00
José Valim
71eca8a5d6
Move from already_added to already_present
2014-09-05 12:50:42 +02:00
José Valim
2cb0639208
Move from module_not_found to the more generic handler_not_found
2014-09-05 11:59:53 +02:00
James Fish
3950130e73
Fix exit signal race condition in logger tests
...
Test process must wait for exit signal before untrapping exits,
otherwise exit signal may cause it to exit.
2014-09-02 11:07:18 +01:00
José Valim
5b4497fa6b
Release v1.0.0-rc1
2014-08-30 13:33:02 -04:00
José Valim
612e124ec9
Add tests for sync_threshold
2014-08-29 08:13:53 -04:00
José Valim
a8b2cb99ee
Use to_string when possible on Logger.log
2014-08-23 14:34:51 -04:00
José Valim
68274311fb
Merge pull request #2712 from fishcakez/logger_rc
...
Fix logger watcher race condition
2014-08-23 14:34:05 -04:00
José Valim
88f84f80b5
Merge pull request #2713 from fishcakez/logger_eh_racecon
...
Fix race condition in Logger.ErrorHandlerTest
2014-08-23 14:32:48 -04:00
James Fish
2bf898e8fe
Fix race condition in Logger.ErrorHandlerTest
...
When crashing the error logger handler, the handler's watcher could log
its message before Logger was flushed, causing the watcher's log
message to appear in the first, rather than second, capture_log.
2014-08-23 19:20:06 +01:00
José Valim
d45f451943
Allow configurable timeout and catch exits on logger
2014-08-23 14:09:11 -04:00
James Fish
c0a075724f
Fix logger watcher race condition
...
Previously a backend could be removed from logger and the watcher would
not have exited before the remove_backend/1 call returned. This meant
that a new watcher could not always be started because the child
(watcher) might still exist but be about to die.
2014-08-23 18:59:13 +01:00
José Valim
f1a39375c9
Do not crash the caller when Logger is not available
...
Instead, return :ok | {:error, :not_available} and leave it up
to the caller to decide.
2014-08-23 13:43:58 -04:00
José Valim
f1aa2f01c7
Merge pull request #2695 from elixir-lang/jv-ge
...
GenEvent++
2014-08-18 16:33:11 -04:00