Andrew Thompson
351e482735
File backends started as part of a trace have a loglevel of 'none'
12 vuotta sitten
Andrew Thompson
c3fc3c4e24
Add tests, fix some bugs & fix dialyzer specs
12 vuotta sitten
Andrew Thompson
da4e0cfa84
Support backend modules defining their own gen_event handler ID
12 vuotta sitten
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 vuotta sitten
Andrew Thompson
67bce42bb8
Add syslog comparison support to file and console backends
12 vuotta sitten
Andrew Thompson
a192bd9e91
Replace mochiglobal with a public ETS table
This also removes the dependency on the syntax_tools and compiler
applications, which interfered with lager's startup/shutdown order.
12 vuotta sitten
Andrew Thompson
e04830b382
Tag lager_msg messages with a {log, ...} tuple
Helps with pattern matching.
12 vuotta sitten
Andrew Thompson
180e09fd01
Use an opaque type with a module for accessors rather than a record
I didn't want the lager_log_message record being used across application
boundaries, this will insulate other applications from any changes to
the message type's internal structure.
12 vuotta sitten
Andrew Thompson
12a784b18e
Time makes fools of us all
12 vuotta sitten
Andrew Thompson
e07c0481ac
One function doesn't make a module
12 vuotta sitten
Andrew Thompson
05718792ae
Whitespace cleanups
13 vuotta sitten
Jason Wagner
0415d21669
Changed the messages sent to the backends to include metadata and separated formatting from the backend. Added documentation, fixed tests, and removed some unused code.
13 vuotta sitten
Andrew Thompson
efc7b7591b
Changes suggested by Kostis, Dialyzer -Wunmatched_returns and Tidier
13 vuotta sitten
Andrew Thompson
caad1f8c83
Fix eunit tests to "start" compiler and syntax_tools
This is just silly busy-work since they're library applications, but
whatever.
13 vuotta sitten
Andrew Thompson
c619263486
Cleanup unused handlers when a trace is removed, documentation
13 vuotta sitten
Andrew Thompson
e3e8c80a04
Fix loglevel changes for files, now they've been refactored
13 vuotta sitten
Andrew Thompson
ac8fb192b1
Implement console tracing, don't generate duplicate messages
13 vuotta sitten
Andrew Thompson
23cbc21964
Implement tracing for the file backend, with tests
13 vuotta sitten
Andrew Thompson
39ef6e4a5c
Re-factor the file backend so it starts one gen_event handler per file
13 vuotta sitten
Andrew Thompson
4dfee06cd9
Make tests less dependant on timer:sleeps to function correctly
14 vuotta sitten
Scott Lystig Fritchie
042e210a9d
Remove application:unload() calls from test code
14 vuotta sitten
Andrew Thompson
d828c35f12
Fixup the tests after merging in the rotation code
14 vuotta sitten
Andrew Thompson
bf5861a548
Tests for the crash log
14 vuotta sitten
Andrew Thompson
3fe861c348
Lots of tests for the file backend
14 vuotta sitten
Andrew Thompson
55e0cc1f5a
schedule_rotation returns undefined when no rotation scheduled
14 vuotta sitten
Andrew Thompson
052b639c0c
Wrap to 80 columns
IBM punchcards rejoice! Basho supports your right to continue to affect
how we format source code :)
14 vuotta sitten
Andrew Thompson
b2d9d06abd
Cleanup logfile option validation, as suggested by @jtuple
14 vuotta sitten
Andrew Thompson
81d4aea7d8
Finish implementing time based log rotation
14 vuotta sitten
Andrew Thompson
6eb8240f1a
Crash log rotation & documentation on rotation
14 vuotta sitten
Andrew Thompson
5c11c70a31
Add simple size based log rotation
14 vuotta sitten
Andrew Thompson
40b0e2d484
Record milliseconds with timestamps, make console less verbose by default
az558
14 vuotta sitten
Andrew Thompson
ec61e88d8a
Make the dialyzer happy.
14 vuotta sitten
Andrew Thompson
886d410eb9
Make highest log level be 0; add some helper macros
14 vuotta sitten
Andrew Thompson
29494de8a1
Fix mistakes in error formatting
14 vuotta sitten
Andrew Thompson
cddb2383b6
Don't deadlock on file handler init error
14 vuotta sitten
Andrew Thompson
862a9cb46c
Documentation!
14 vuotta sitten
Andrew Thompson
b72db977ba
Graceful handling of when there's no more disk space
14 vuotta sitten
Andrew Thompson
fed110379e
Add a crash.log logger, based on riak_err, that logs error reports in more detail
14 vuotta sitten
Andrew Thompson
761642eddb
Add ability to adjust loglevel per handler at runtime
14 vuotta sitten
Andrew Thompson
75a5088676
Make the file backend clean up on terminate
14 vuotta sitten
Andrew Thompson
7bcf044f1a
Initial import
14 vuotta sitten