Andrew Thompson
cf89804ced
Switch between gen_event notify/sync_notify based on message queue length
In normal operation, there's no need for log messages to be synchronous.
Its slower and introduces a global serialization point in the
application.
However, when in an overload condition, synchronous logging is good
because it limits each process to at most 1 log message in flight.
So, this change allows the gen_event at the core of lager to switch
modes depending on the size of the gen_event's mailbox. It should
provide better performance in the case of normal load, but it will also
prevent unbounded mailbox growth if an overload occurs.
The threshold at which the switch between async and sync is done is
configured via the 'async_threshold' app env var.
hace 12 años
Andrew Thompson
c72a761056
Merge pull request #115 from mworrell/mw-supervisor-name
Don't assume the supervisor is a registered process.
hace 12 años
Marc Worrell
e133ca4992
Replaced another use of element(2,Pid). Added some tests with somepid instead {local,name} as supervisor reference
hace 12 años
Andrew Thompson
704613dab7
Allow crash_log option to be 'false' as well
hace 12 años
Marc Worrell
31a1e9e693
Make the tests pass, show the local name whem the supervisor is {local, Name}
hace 12 años
Marc Worrell
b8ce2a64f7
Don't assume the supervisor is a registered process, it could also be a pid.
hace 12 años
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.
hace 12 años
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.
hace 12 años
Andrew Thompson
7993c8f8a2
Merge pull request #112 from ewanmellor/non-atom-levels
Improve lager_console_backend to support non-atom output log levels.
hace 12 años
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
).
hace 12 años
Andrew Thompson
467204dbbf
Merge pull request #108 from basho/adt-iolist-printing
Lager doesn't print iolists with ~s right
hace 12 años
Andrew Thompson
c8eed35184
Remove broken code for stripping square brackets
hace 12 años
Andrew Thompson
becce00d3e
Fix cowboy error handling
hace 12 años
Andrew Thompson
9e5371a696
Prettyprint webmachine and cowboy error_logger messages
hace 12 años
Andrew Thompson
2a8706bbf6
Merge pull request #54 from basho/adt-variable-arguments
Parse transform can't handle `Attr' as a variable
hace 12 años
Andrew Thompson
80e53076fc
Fix some bugs uncovered in review
hace 12 años
Andrew Thompson
b3428c89bc
Merge pull request #103 from basho/adt-lager-registered-procs
Empty registered processes section in lager.app.src.
hace 12 años
Andrew Thompson
2bb8feb6b0
Fiddle with test timeouts to accomodate slower machines
hace 12 años
Andrew Thompson
0ec0d9055b
Also allow list comps, function calls and record fields as lager arguments
hace 12 años
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.
hace 12 años
Andrew Thompson
932b482e4a
Support printing iolists with ~s
hace 12 años
Andrew Thompson
e749242087
Merge pull request #105 from basho/adt-fix-tracing
Tracing without using parse transform.
hace 12 años
Andrew Thompson
24d17d05fa
Fix for loglevel none in status
hace 12 años
Andrew Thompson
351e482735
File backends started as part of a trace have a loglevel of 'none'
hace 12 años
Andrew Thompson
c8096302aa
Fix a regression about setting loglevel to 'none'
hace 12 años
Andrew Thompson
069e553f1d
Fix a couple bugs in tracing
hace 12 años
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...
hace 12 años
Tristan Sloughter
10059b60ae
add whitelist of error_logger handlers not to delete when error_logger_redirect is true
hace 12 años
Andrew Thompson
7986ec43a1
A sacrifice to the dialyzer god
hace 12 años
Andrew Thompson
3d429a33f3
Merge branch 'adt-application-metadata'
hace 12 años
Andrew Thompson
0ed603bd58
Merge branch 'adt-syslog-comparison-flags'
hace 12 años
Andrew Thompson
c3fc3c4e24
Add tests, fix some bugs & fix dialyzer specs
hace 12 años
Andrew Thompson
9b73d461d0
Document the registered process in the .app file
This helps systools detect registered name clashes
hace 12 años
Andrew Thompson
3bf2475952
Merge branch 'adt-ets-config'
hace 12 años
Andrew Thompson
2b51f7b4b5
Merge pull request #100 from basho/adt-record-printing
Support pretty printing records found in a module at compile time
hace 12 años
Andrew Thompson
1074416140
Return Default if lager_config:get/2 crashes
hace 12 años
Andrew Thompson
dda46da731
Merge pull request #102 from basho/adt-backend-id
Support backend modules defining their own gen_event handler ID
hace 12 años
Andrew Thompson
5cfaba3d31
Merge pull request #101 from basho/adt-format-errors
Reject invalid format strings more aggressively
hace 12 años
Andrew Thompson
f566318bdc
Add some more record printing tests and fix a bug
hace 12 años
Andrew Thompson
86c7c620bc
Lager master will become lager 2.0
hace 12 años
Andrew Thompson
da4e0cfa84
Support backend modules defining their own gen_event handler ID
hace 12 años
Andrew Thompson
ecebfe4269
Reject invalid format strings more aggressively
hace 12 años
Andrew Thompson
9bd0a411a3
Support pretty printing records found in a module at compile time
hace 12 años
Andrew Thompson
45f833e5db
Attempt to determine application at compile time and store in metadata
hace 12 años
Andrew Thompson
8d353aab65
Merge pull request #98 from gotthardp/no_macro_overload2
BUGFIX: Avoid overloading the LOG macro.
hace 12 años
Petr Gotthard
1c7a29f4fc
BUGFIX: Avoid overloading the LOG macro.
hace 12 años
Andrew Thompson
f4f3dd3817
Rewrite to use a bitmask to represent active loglevels
Also, adapt the rest of lager to use this bitmask as well.
hace 12 años
Andrew Thompson
bf1efd0573
Merge pull request #81 from ypaq/master
Added node to metadata in parse transfrom
hace 12 años
Andrew Thompson
67bce42bb8
Add syslog comparison support to file and console backends
hace 12 años
Andrew Thompson
f2f08d13fa
Merge pull request #85 from blinkov/master
Add "SMTP Support" section to README.org
hace 12 años