[
    %% SASL config
    {sasl, [{sasl_error_logger, false}]},

    %% lager config
    {lager, [
        {handlers, [
            %% show info level or higher level logs at console
            {lager_console_backend, debug},
            %% rotate error log once a month (first day of month, 1 a.m) or when it reaches 1 GB; keep 1000 rotated logs
            {lager_file_backend, [{file, "log/error.log"}, {level, error}, {size, 1048576000}, {date, "$M1D1"}, {count, 1000}]},
            %% rotate info log once a week (friday at 11 p.m) or when it reaches 100 MB; keep 100 rotated logs
            {lager_file_backend, [{file, "log/info.log"}, {level, info}, {size, 104857600}, {date, "$W5D23"}, {count, 100}]},
            %% rotate info log once a day (at midnight) or when it reaches 10 MB; keep 10 rotated logs
            {lager_file_backend, [{file, "log/debug.log"}, {level, debug}, {size, 10485760}, {date, "$D0"}, {count, 10}]}
        ]},
        {error_logger_hwm, 200},
        % when lager should change mode to synchronous (log queue is longer than async_threshold)
        {async_threshold, 500},
        % when lager should return from mode to synchronous (log queue is shorter than (async_threshold - async_threshold_window)
        {async_threshold_window, 50}
    ]},

    %% Set debug loglevel as default in appmock
    {ctool, [
        {current_loglevel, 0}
    ]},

    %% The line below is modified by starter script
    %% After the modification, the config looks as follows:
    %% [{app_description_file, FilePath}]
    {appmock, []}
].

