Pedram Nimreezi
be6a315e59
Fix lager eunit initialization
11 лет назад
Andrew Thompson
7af433004d
Correct some dialyzer warnings
12 лет назад
Scott Lystig Fritchie
a702bf10c4
A few small things:
1. Add set_high_water/1 to adjust the high water mark after startup
2. Add test func t0/0 to demo (interactively only, sorry) that the
limiting is working as we expect).
3. Remove a couple of comments.
12 лет назад
Andrew Thompson
ef691d8947
Implement configurable error_logger msg drop threshold
Implement a new config option error_logger_hwm, which is a number
representing how many messages per second we should log from the
error_logger. If that threshold is exceeded, messages will be discarded
for the remainder of that second.
This is only effective if lager itself can process the messages fast
enough to satisfy the threshold. If your threshold is 1000 and lager
itself is only writing 100 messages a second (because error messages are
causing fsyncs or whatever) you'll never exceed the threshold and drops
will never happen. Thus care needs to be taken when selecting this
feature.
Setting it low is not as bad as it might seem, because when using lager,
hopefully error_logger messages are unusual. In my testing, 50/second
with the default config seemed reasonable (which has 2 file backends
installed, both of which fsync on messages at error or above).
12 лет назад
Marc Worrell
e133ca4992
Replaced another use of element(2,Pid). Added some tests with somepid instead {local,name} as supervisor reference
12 лет назад
Marc Worrell
31a1e9e693
Make the tests pass, show the local name whem the supervisor is {local, Name}
12 лет назад
Marc Worrell
b8ce2a64f7
Don't assume the supervisor is a registered process, it could also be a pid.
12 лет назад
Andrew Thompson
becce00d3e
Fix cowboy error handling
12 лет назад
Andrew Thompson
9e5371a696
Prettyprint webmachine and cowboy error_logger messages
12 лет назад
Petr Gotthard
1c7a29f4fc
BUGFIX: Avoid overloading the LOG macro.
12 лет назад
Andrew Thompson
12a784b18e
Time makes fools of us all
12 лет назад
Andrew Thompson
55283cc2c2
Make the default truncation limit a macro
12 лет назад
Andrew Thompson
bc338b22e9
Fix dialyzer warnings
13 лет назад
Andrew Thompson
d3cff8c6d7
R14B support for ucaught throws
13 лет назад
Andrew Thompson
fad809bed4
Handle uncaught throws in a gen_* process better
13 лет назад
Andrew Thompson
0a3d64f078
Better error handling for 'special processes'
13 лет назад
Andrew Thompson
62bb41fd35
Add support for badrecord errors
13 лет назад
Andrew Thompson
b52e204f24
Don't bother printing the filename in error messages, it is always redundant
Whenever we have the filename we ALWAYS have the module name, which is
effectively just as useful and already printed.
13 лет назад
Andrew Thompson
d68f4d855f
Add support for bad_return errors from application start
13 лет назад
Andrew Thompson
807a847638
Fix tests. and 2 places MFAs werent handling the new 4th parameter
Tests now pass on both R15B and R14B03.
13 лет назад
Andrew Thompson
68065c166b
Intial support for R15 line numbers in errors
13 лет назад
Andrew Thompson
efc7b7591b
Changes suggested by Kostis, Dialyzer -Wunmatched_returns and Tidier
13 лет назад
Andrew Thompson
dc750f5417
Supervisor children are not guranteed to be atoms. Fixes issue #33
13 лет назад
Andrew Thompson
c21f1bdd9b
Better crash reports for processes started via proc_lib, Fixes #31
13 лет назад
Andrew Thompson
24d8d05080
Supervisor child names can be strings
13 лет назад
Andrew Thompson
16fb55890c
Correct printing of strings in mixed error reports (reported by Bryan Hughes)
Since the lager_format rewrite, ~p and ~w now have different behaviour
with regard to printing lists as strings.
13 лет назад
Andrew Thompson
de5d84e349
Fix how the name/pid of the process is printed in crash reports
Before this fix, the code assumed that processes without a registered
name omitted the {registered_name, X} tuple in the crash report. In
actual fact, process_info/2 returns [] when the process has no
registered name, so unregistered processes were being printed with a
"name" of "[]". This corrects the code to print the Pid in this case
instead.
13 лет назад
Andrew Thompson
b61718ff80
Make the call to the crash log synchronous only when testing
13 лет назад
Andrew Thompson
4dfee06cd9
Make tests less dependant on timer:sleeps to function correctly
13 лет назад
Andrew Thompson
6fdbe25071
Use mfargs instead of name attribute as the way to detect supervisor_bridge
As Ryan pointed out, the 'name' of a supervisor's child may be
'undefined' for a simple_one_for_one supervisor.
13 лет назад
Andrew Thompson
53d5de448c
Fix term printing in errors to properly show embedded lists
The ~w formatting used before was not printing lists embedded in other
terms. This change uses trunc_io to print those terms safely and without
potentially introducing linebreaks (like ~p would)
13 лет назад
Scott Lystig Fritchie
83c2a412ab
Mash in the remainder of adt-error-format-protection branch
13 лет назад
Andrew Thompson
052b639c0c
Wrap to 80 columns
IBM punchcards rejoice! Basho supports your right to continue to affect
how we format source code :)
13 лет назад
Andrew Thompson
0d3e45a39e
Plug some large error_logger message holes with trunc_io
13 лет назад
Andrew Thompson
d0338f11a8
Use format_reason in supervisor child exit messages, too
14 лет назад
Andrew Thompson
157d676562
Handle ETS table count system limit
14 лет назад
Andrew Thompson
ec61e88d8a
Make the dialyzer happy.
14 лет назад
Andrew Thompson
c738bf3622
Supervisor startup should be debug level
14 лет назад
Andrew Thompson
4ac01374fa
Rename trunc_io to lager_trunc_io to prevent clashes
14 лет назад
Andrew Thompson
886d410eb9
Make highest log level be 0; add some helper macros
14 лет назад
Andrew Thompson
7e68976e1b
Try to improve M:F(A) printing a little
14 лет назад
Andrew Thompson
862a9cb46c
Documentation!
14 лет назад
Andrew Thompson
fed110379e
Add a crash.log logger, based on riak_err, that logs error reports in more detail
14 лет назад
Andrew Thompson
a6325a7831
Add formatting for emfile and for various system limits
14 лет назад
Andrew Thompson
e9abf79aac
Handle 'single term' error_logger reports
14 лет назад
Andrew Thompson
af2f2200f8
Log unexpected error_logger messages to lager
14 лет назад
Andrew Thompson
5b9a4c6161
Support warning messages, put commas between terms in report messages
14 лет назад
Andrew Thompson
10153cff92
Optimize list construction, somewhat
14 лет назад
Andrew Thompson
399e43f8f4
Check threshold when generating messages from error_logger
14 лет назад
Andrew Thompson
1f3493df12
Restart error_logger handler if it exits, cleanups
14 лет назад