Andrew Thompson
2607490cf9
Merge pull request #111 from basho/adt-1.2-compat
Compatability with beams compiled with lager 1.2
12 jaren geleden
Andrew Thompson
4dc1d4a0b8
compatability with beams compiled with lager 1.2
12 jaren geleden
Andrew Thompson
c237e6fde9
Add some tests to test for the bug the previous commit fixed
12 jaren geleden
Andrew Thompson
78e9e1ee31
Merge pull request #114 from ewanmellor/fix-min-level
Add an update to the global loglevel when a new handler is installed
12 jaren geleden
Andrew Thompson
135bbddbe5
Merge pull request #116 from basho/adt-msg-drop
Implement configurable error_logger msg drop threshold
12 jaren geleden
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 jaren geleden
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 jaren geleden
Andrew Thompson
c72a761056
Merge pull request #115 from mworrell/mw-supervisor-name
Don't assume the supervisor is a registered process.
12 jaren geleden
Marc Worrell
e133ca4992
Replaced another use of element(2,Pid). Added some tests with somepid instead {local,name} as supervisor reference
12 jaren geleden
Marc Worrell
31a1e9e693
Make the tests pass, show the local name whem the supervisor is {local, Name}
12 jaren geleden
Marc Worrell
b8ce2a64f7
Don't assume the supervisor is a registered process, it could also be a pid.
12 jaren geleden
Ewan Mellor
df90ea05cf
Add an update to the global loglevel when a new handler is installed.
This fixes a bug where messages were incorrectly discarded if the new
handler is using log levels that are different from those in use by handlers
that were set up at start-of-day.
12 jaren geleden
Ewan Mellor
228f2b98cf
Bring some duplicate code together around the loglevel handling.
Add add_trace_to_loglevel_config and update_loglevel_config. These two
handle most of the updates to the loglevel config item, including the
update of the overall logging mask.
This makes minimum_loglevel private.
This doesn't change any behavior -- it just a tidy-up.
12 jaren geleden
Andrew Thompson
7993c8f8a2
Merge pull request #112 from ewanmellor/non-atom-levels
Improve lager_console_backend to support non-atom output log levels.
12 jaren geleden
Ewan Mellor
4e3ea7ba98
Improve lager_console_backend to support non-atom output log levels.
This supports forms such as "!notice" for configuring the output
log level (using the config handling changes from 7aa316902e
).
12 jaren geleden
Andrew Thompson
467204dbbf
Merge pull request #108 from basho/adt-iolist-printing
Lager doesn't print iolists with ~s right
12 jaren geleden
Andrew Thompson
c8eed35184
Remove broken code for stripping square brackets
12 jaren geleden
Andrew Thompson
2a8706bbf6
Merge pull request #54 from basho/adt-variable-arguments
Parse transform can't handle `Attr' as a variable
12 jaren geleden
Andrew Thompson
80e53076fc
Fix some bugs uncovered in review
12 jaren geleden
Andrew Thompson
b3428c89bc
Merge pull request #103 from basho/adt-lager-registered-procs
Empty registered processes section in lager.app.src.
12 jaren geleden
Andrew Thompson
2bb8feb6b0
Fiddle with test timeouts to accomodate slower machines
12 jaren geleden
Andrew Thompson
0ec0d9055b
Also allow list comps, function calls and record fields as lager arguments
12 jaren geleden
Andrew Thompson
95fdf935b9
Support variables as arguments to lager:info and friends
As long as *one* of the arguments is a literal, lager can figure out
what you're trying to do and (re)arrange the arguments as necessary.
12 jaren geleden
Andrew Thompson
932b482e4a
Support printing iolists with ~s
12 jaren geleden
Andrew Thompson
e749242087
Merge pull request #105 from basho/adt-fix-tracing
Tracing without using parse transform.
12 jaren geleden
Andrew Thompson
24d17d05fa
Fix for loglevel none in status
12 jaren geleden
Andrew Thompson
351e482735
File backends started as part of a trace have a loglevel of 'none'
12 jaren geleden
Andrew Thompson
c8096302aa
Fix a regression about setting loglevel to 'none'
12 jaren geleden
Andrew Thompson
069e553f1d
Fix a couple bugs in tracing
12 jaren geleden
Andrew Thompson
3162ad7f6b
Merge pull request #104 from tsloughter/error_logger_whitelist
add whitelist of error_logger handlers not to delete when error_logger_r...
12 jaren geleden
Tristan Sloughter
10059b60ae
add whitelist of error_logger handlers not to delete when error_logger_redirect is true
12 jaren geleden
Andrew Thompson
7986ec43a1
A sacrifice to the dialyzer god
12 jaren geleden
Andrew Thompson
3d429a33f3
Merge branch 'adt-application-metadata'
12 jaren geleden
Andrew Thompson
0ed603bd58
Merge branch 'adt-syslog-comparison-flags'
12 jaren geleden
Andrew Thompson
c3fc3c4e24
Add tests, fix some bugs & fix dialyzer specs
12 jaren geleden
Andrew Thompson
9b73d461d0
Document the registered process in the .app file
This helps systools detect registered name clashes
12 jaren geleden
Andrew Thompson
3bf2475952
Merge branch 'adt-ets-config'
12 jaren geleden
Andrew Thompson
2b51f7b4b5
Merge pull request #100 from basho/adt-record-printing
Support pretty printing records found in a module at compile time
12 jaren geleden
Andrew Thompson
1074416140
Return Default if lager_config:get/2 crashes
12 jaren geleden
Andrew Thompson
dda46da731
Merge pull request #102 from basho/adt-backend-id
Support backend modules defining their own gen_event handler ID
12 jaren geleden
Andrew Thompson
5cfaba3d31
Merge pull request #101 from basho/adt-format-errors
Reject invalid format strings more aggressively
12 jaren geleden
Andrew Thompson
f566318bdc
Add some more record printing tests and fix a bug
12 jaren geleden
Andrew Thompson
86c7c620bc
Lager master will become lager 2.0
12 jaren geleden
Andrew Thompson
da4e0cfa84
Support backend modules defining their own gen_event handler ID
12 jaren geleden
Andrew Thompson
ecebfe4269
Reject invalid format strings more aggressively
12 jaren geleden
Andrew Thompson
9bd0a411a3
Support pretty printing records found in a module at compile time
12 jaren geleden
Andrew Thompson
45f833e5db
Attempt to determine application at compile time and store in metadata
12 jaren geleden
Andrew Thompson
8d353aab65
Merge pull request #98 from gotthardp/no_macro_overload2
BUGFIX: Avoid overloading the LOG macro.
12 jaren geleden
Petr Gotthard
1c7a29f4fc
BUGFIX: Avoid overloading the LOG macro.
12 jaren geleden
Andrew Thompson
f4f3dd3817
Rewrite to use a bitmask to represent active loglevels
Also, adapt the rest of lager to use this bitmask as well.
12 jaren geleden