|
@ -111,8 +111,8 @@ init(LogFileConfig) when is_list(LogFileConfig) -> |
|
|
{error, {fatal, bad_config}}; |
|
|
{error, {fatal, bad_config}}; |
|
|
Config -> |
|
|
Config -> |
|
|
%% probabably a better way to do this, but whatever |
|
|
%% probabably a better way to do this, but whatever |
|
|
[RelName, Level, Date, Size, Count, Rotator, HighWaterMark, SyncInterval, SyncSize, SyncOn, CheckInterval, Formatter, FormatterConfig] = |
|
|
|
|
|
[proplists:get_value(Key, Config) || Key <- [file, level, date, size, count, rotator, high_water_mark, sync_interval, sync_size, sync_on, check_interval, formatter, formatter_config]], |
|
|
|
|
|
|
|
|
[RelName, Level, Date, Size, Count, Rotator, HighWaterMark, Flush, SyncInterval, SyncSize, SyncOn, CheckInterval, Formatter, FormatterConfig] = |
|
|
|
|
|
[proplists:get_value(Key, Config) || Key <- [file, level, date, size, count, rotator, high_water_mark, flush_queue, sync_interval, sync_size, sync_on, check_interval, formatter, formatter_config]], |
|
|
FlushThr = proplists:get_value(flush_threshold, Config, 0), |
|
|
FlushThr = proplists:get_value(flush_threshold, Config, 0), |
|
|
Name = lager_util:expand_path(RelName), |
|
|
Name = lager_util:expand_path(RelName), |
|
|
schedule_rotation(Name, Date), |
|
|
schedule_rotation(Name, Date), |
|
|