-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #420 from windkit/for-leofs
Add custom log rotator option and hourly log rotation
- Loading branch information
Showing
8 changed files
with
301 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-module(lager_rotator_behaviour). | ||
|
||
%% @doc Create a log file | ||
-callback(create_logfile(Name::list(), Buffer::{integer(), integer()} | any()) -> | ||
{ok, {file:io_device(), integer(), integer()}} | {error, any()}). | ||
|
||
%% @doc Open a log file | ||
-callback(open_logfile(Name::list(), Buffer::{integer(), integer()} | any()) -> | ||
{ok, {file:io_device(), integer(), integer()}} | {error, any()}). | ||
|
||
%% @doc Ensure reference to current target, could be rotated | ||
-callback(ensure_logfile(Name::list(), FD::file:io_device(), Inode::integer(), | ||
Buffer::{integer(), integer()} | any()) -> | ||
{ok, {file:io_device(), integer(), integer()}} | {error, any()}). | ||
|
||
%% @doc Rotate the log file | ||
-callback(rotate_logfile(Name::list(), Count::integer()) -> | ||
ok). |
Oops, something went wrong.