Daniil Fedotov
c278368a65
Replace API for file rotation. Now supports rotate_handler/1,2 to rotate custom handler
9 anni fa
Mark Allen
cb5114fbc3
Delete trace from the global handler list too
9 anni fa
Daniil Fedotov
962eb2c1d7
Rotate as gen_event:call
9 anni fa
Daniil Fedotov
af3a2d79c4
API to explicitly call log rotation
9 anni fa
Alexander Verbitsky
aef8b9a9f4
Rewriting of function for printing stacktrace in human readable form with using 'format_mfa'
9 anni fa
Alexander Verbitsky
030309e8f1
Backward compatibility for old OTP versions
9 anni fa
Alexander Verbitsky
93f1c95894
Function for printing stacktrace in human readable form
9 anni fa
John R. Daily
13d4db235d
Intercept error_logger as pseudo-sink before getting deeper into loglevel code
9 anni fa
Mark Allen
25b700d930
{ok, exists} is accounted for in the code path
Removed comment
9 anni fa
Mark Allen
d7cd9fc36d
Rename list_all_sinks
9 anni fa
Mark Allen
5bcdadeccb
Add log_unsafe/4
10 anni fa
Mark Allen
e0abc34a32
Remove testing crutch
10 anni fa
Mark Allen
512fac4a21
Add unsafe_formatting option
10 anni fa
pvmart
8bc6408ec0
fix lager:stop_trace
Fix stop_trace_int so it can remove an event handler
10 anni fa
John R. Daily
e78cc1c40d
Backwards compatibility for any code sufficiently ill-behaved to invoke 2.x do_log directly
10 anni fa
Mark Allen
1906cb247d
Export get_loglevel/2 (derp)
10 anni fa
Mark Allen
8a178613e3
Fix errors in dispatch_log/6 parse transform
Originally I tried to bodge in a handcoded parse transform and it
did not go very well. This time, we simplify the case statement
in lager.erl and use this simplified version in the parse transform
after getting the AST from the Erlang compiler.
10 anni fa
Mark Allen
c4e2520665
Fix derpy case clause with whereis
10 anni fa
Mark Allen
566a6dc626
If Sink referenced but not running, return error
If a sink is referenced in a call, but is not configured
(by being a running process), then emit an
{error, {sink_not_configured, Sink}} tuple.
10 anni fa
John R. Daily
b0a2c4c82e
More bugfixes re: trace file handling
10 anni fa
John R. Daily
89ca81df2d
Bugfix: handler tuple order was incorrect
10 anni fa
John R. Daily
e08fc432a8
Fix status
10 anni fa
John R. Daily
d5856f2284
Add sink identification export
10 anni fa
John R. Daily
a71a7ff1a7
Do not forget to clear traces from global loglevel settings
10 anni fa
MaximMinin
b7da929f69
trace_file don't work, if env "log_root" is set.
10 anni fa
John R. Daily
5c1a0795cf
Need dat get_loglevels/4
10 anni fa
John R. Daily
67565b4444
Need 2ary get_loglevel (shame it is broken tho)
10 anni fa
John R. Daily
5f3f0fee6c
Match the correct tuple. Return an {ok, _} tuple so the next case statement does not get confused
10 anni fa
John R. Daily
a462c046fe
Various bugfixes of various levels of desperation
10 anni fa
John R. Daily
2926dd51a1
get/2 was confusing: Sink, Key or Key, Default. Clean up by forcing into {Sink, Key} tuple
10 anni fa
John R. Daily
efd3164248
Stupid compiler errors
10 anni fa
John R. Daily
0ec113132b
Traces now are assigned to a single sink as requested (or lager_event by default)
10 anni fa
John R. Daily
cc7e4d26d4
Start incorporating support for dedicated tracing sink
10 anni fa
John R. Daily
6f6b0110f2
Starting down the path of making backends handle multiple sinks (primary use case is tracing)
10 anni fa
John R. Daily
f8cd7ec888
More DEFAULT_SINK
10 anni fa
Mayorov Andrey
be758ee3f4
Provide means to compress printed record output
Sometimes there are a LOT of records going through logging backends
which contain notable number of empty (i.e. undefined) fields. This
humble patch solemnly introduces new function `lager:pr/3` designed to
help cope with such kind of issues, providing a one and only option `compress`
which, when turned on, effectively eliminates any empty fields in records.
10 anni fa
John R. Daily
730ab66717
For places in the revised API where we use lager_event as a default value, use a macro instead
10 anni fa
Mark Allen
f6e6b83927
Record some code comments from jrd walk-thru
10 anni fa
Mark Allen
90ce2ac2b9
WIP
Finish lager API modifications
Update config API to handle multiple sinks
Identify areas where new code is yet to be written
10 anni fa
Mark Allen
546036f75a
WIP
First pass at adding sink parameter into the external API layer.
TODO:
* config updates
* loglevel changes per sink
10 anni fa
Andrew Thompson
95f5a133af
Fix #163 - start the file backend if it isn't running but a trace uses it
10 anni fa
Andrew Thompson
b0a5d08227
Fix trace_file to return the new trace return type
10 anni fa
Andrew Thompson
c2b75f0674
Make start_trace return a term that stop_trace/1 can consume
10 anni fa
Eric Liang
cd36e96fd7
add set_loghwm method in order to change high water mark on the fly
10 anni fa
Eric Liang
e1a2907d5c
refactor message flow control by encapsulating high water mark in lager_shaper
10 anni fa
Luis Rascao
9d0bfda1d5
make trace and stop_trace take the same arguments
10 anni fa
Shane Howley
d58e633e15
Fixed issue whereby element(1, ...) is called on every tuple nested inside a pretty printed record regardless of size.
Modified unit test to test 0 size tuple case.
11 anni fa
Andrew Thompson
faf3096d99
Fix dialyzer warnings and make all the records typed
11 anni fa
Maxim Minin
4c7e77e8f1
pr fun for nested records.
11 anni fa
Steve Strong
7d76822341
Added options parameter to lager:trace_file
11 anni fa