emqx/apps/emqx_conf
Thales Macedo Garitezi fdcd73e20c fix(file_logger): change file logger type depending on rotation size
Fixes https://emqx.atlassian.net/browse/EMQX-11036

From `logger_disk_log_h:open_disk_log`:

```erlang
open_disk_log(Name,File,Type,MaxNoBytes,MaxNoFiles) ->
    case filelib:ensure_dir(File) of
        ok ->
            Size =
                if Type==halt -> MaxNoBytes;
                   Type==wrap -> {MaxNoBytes,MaxNoFiles} %% <-------
                end,
            Opts = [{name,   Name},
                    {file,   File},
                    {size,   Size},
                    {type,   Type},
                    {linkto, self()},
                    {repair, false},
                    {format, external},
                    {notify, true},
                    {quiet,  true},
                    {mode,   read_write}],
            case disk_log:open(Opts) of
```

Affects all file loggers (audit included):

```
% emqx_config_logger:update_log_handler/1 -> ok
iex(emqx@127.0.0.1)14> Config override: log.file.emqx_audit is updated, but failed to add handler: {handler_not_added,
                                                                             {badarg,
                                                                              [{size,
                                                                                {infinity,
                                                                                 10}},
                                                                               {type,
                                                                                wrap},
                                                                               {linkto,
                                                                                <0.1952.0>},
                                                                               {repair,
                                                                                false},
                                                                               {format,
                                                                                external},
                                                                               {notify,
                                                                                true},
                                                                               {quiet,
                                                                                true},
                                                                               {mode,
                                                                                read_write}]}}
```
2023-09-26 09:04:44 -03:00
..
etc chore: modify the build to copy examples into the release 2023-06-20 14:53:14 +08:00
include fix: load authz's default sources 2023-06-11 09:11:17 +08:00
src fix(audit): only support audit log on enterprise edition 2023-09-25 15:59:35 -03:00
test fix(file_logger): change file logger type depending on rotation size 2023-09-26 09:04:44 -03:00
.gitignore chore: update .gitignore emqx_conf generated files 2022-04-29 16:43:51 +08:00
README.md chore: modify the build to copy examples into the release 2023-06-20 14:53:14 +08:00
rebar.config chore(auth): improve emqx_config_handler to replace adhoc config updates 2023-08-16 20:41:05 +03:00

Configuration Management

This application provides configuration management capabilities for EMQX.

At compile time it reads all configuration schemas and generates the following files:

  • config-en.md: documentation for all configuration options.
  • schema-en.json: JSON description of all configuration schema options.

At runtime, it provides:

  • Cluster configuration synchronization capability. Responsible for synchronizing hot-update configurations from the HTTP API to the entire cluster and ensuring consistency.

In addition, this application manages system-level configurations such as cluster, node, log.