Joseph Wecker
e2324d189c
Set source encoding so R17 compiler doesn't choke on code introduced in 2b544c4
11 år sedan
Shane Howley
148760f1ff
Fixed log rotation hang when file:delete fails.
12 år sedan
Andrew Thompson
24029226d1
Allow date rotation to be disabled
12 år sedan
Andrew Thompson
ccdc4d4c8f
Rework the 'old shell' warning, and some related work
Add ability for handlers to 'fatally' fail, so they won't attempt to
reinstall themselves later.
Also fix an issue with the INT_LOG macro not doing the right thing when
only the lager_throttle_backend was installed.
12 år sedan
Andrew Thompson
65c8a1ea42
Kill org-mode in favor of markdown, update docs and defaults
12 år sedan
Andrew Thompson
020bf389e4
Clarify the file backend's init() spec, correct some documentation
12 år sedan
Andrew Thompson
2b544c40b1
Add a latin-1 test
12 år sedan
gsmith
0188f31d8b
Fix typespecs for a clean dialyzer run
Fix typespec of lager_file_backend:init() and lager_msg record
12 år sedan
Péter Gömöri
f1e63164e6
test internal log rotation when check_interval > 0
12 år sedan
Péter Gömöri
0fc956b9ff
fix internal log rotation when check_interval > 0
12 år sedan
Andrew Thompson
32cc67dd4e
Support writing unicode to files, thanks @jacktang
12 år sedan
Andrew Thompson
79ea55a196
Improve the performance of the file backend
This is done via a combination of several things:
* Make the loglevel that triggers a sync configurable
* Make the delayed_write size and intervals configurable
* Make the interval at which external rotation is checked for
configurable
* Store the timestamp a lager_msg was created inside the lager_msg
To support these changes, several other things had to be modified:
* lager_msg:timestamp now returns a timestamp
* lager_msg:datetime was added to return the {date, time} of a message,
like lager_msg:timestamp used to
* The configuration syntax for file backends was changed to be of the
form {lager_file_backend, proplist()} and the old syntax was
deprecated
Additionally, the defaults for the check_interval was raised from
'always' to 1 second, and the sync_interval was changed from 2 seconds
to one second.
12 år sedan
Andrew Thompson
351e482735
File backends started as part of a trace have a loglevel of 'none'
12 år sedan
Andrew Thompson
c3fc3c4e24
Add tests, fix some bugs & fix dialyzer specs
12 år sedan
Andrew Thompson
da4e0cfa84
Support backend modules defining their own gen_event handler ID
12 år sedan
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 år sedan
Andrew Thompson
67bce42bb8
Add syslog comparison support to file and console backends
12 år sedan
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 år sedan
Andrew Thompson
e04830b382
Tag lager_msg messages with a {log, ...} tuple
Helps with pattern matching.
12 år sedan
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 år sedan
Andrew Thompson
12a784b18e
Time makes fools of us all
12 år sedan
Andrew Thompson
e07c0481ac
One function doesn't make a module
12 år sedan
Andrew Thompson
05718792ae
Whitespace cleanups
13 år sedan
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 år sedan
Andrew Thompson
efc7b7591b
Changes suggested by Kostis, Dialyzer -Wunmatched_returns and Tidier
13 år sedan
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 år sedan
Andrew Thompson
c619263486
Cleanup unused handlers when a trace is removed, documentation
13 år sedan
Andrew Thompson
e3e8c80a04
Fix loglevel changes for files, now they've been refactored
13 år sedan
Andrew Thompson
ac8fb192b1
Implement console tracing, don't generate duplicate messages
13 år sedan
Andrew Thompson
23cbc21964
Implement tracing for the file backend, with tests
13 år sedan
Andrew Thompson
39ef6e4a5c
Re-factor the file backend so it starts one gen_event handler per file
13 år sedan
Andrew Thompson
4dfee06cd9
Make tests less dependant on timer:sleeps to function correctly
14 år sedan
Scott Lystig Fritchie
042e210a9d
Remove application:unload() calls from test code
14 år sedan
Andrew Thompson
d828c35f12
Fixup the tests after merging in the rotation code
14 år sedan
Andrew Thompson
bf5861a548
Tests for the crash log
14 år sedan
Andrew Thompson
3fe861c348
Lots of tests for the file backend
14 år sedan
Andrew Thompson
55e0cc1f5a
schedule_rotation returns undefined when no rotation scheduled
14 år sedan
Andrew Thompson
052b639c0c
Wrap to 80 columns
IBM punchcards rejoice! Basho supports your right to continue to affect
how we format source code :)
14 år sedan
Andrew Thompson
b2d9d06abd
Cleanup logfile option validation, as suggested by @jtuple
14 år sedan
Andrew Thompson
81d4aea7d8
Finish implementing time based log rotation
14 år sedan
Andrew Thompson
6eb8240f1a
Crash log rotation & documentation on rotation
14 år sedan
Andrew Thompson
5c11c70a31
Add simple size based log rotation
14 år sedan
Andrew Thompson
40b0e2d484
Record milliseconds with timestamps, make console less verbose by default
az558
14 år sedan
Andrew Thompson
ec61e88d8a
Make the dialyzer happy.
14 år sedan
Andrew Thompson
886d410eb9
Make highest log level be 0; add some helper macros
14 år sedan
Andrew Thompson
29494de8a1
Fix mistakes in error formatting
14 år sedan
Andrew Thompson
cddb2383b6
Don't deadlock on file handler init error
14 år sedan
Andrew Thompson
862a9cb46c
Documentation!
14 år sedan
Andrew Thompson
b72db977ba
Graceful handling of when there's no more disk space
14 år sedan
Andrew Thompson
fed110379e
Add a crash.log logger, based on riak_err, that logs error reports in more detail
14 år sedan