Ver código fonte

fix(logging): log sasl to tty when console or foreground

Zaiming Shi 4 anos atrás
pai
commit
87a653470e
2 arquivos alterados com 3 adições e 15 exclusões
  1. 1 2
      etc/emqx.conf
  2. 2 13
      priv/emqx.schema

+ 1 - 2
etc/emqx.conf

@@ -408,8 +408,7 @@ rpc.socket_buffer = 1MB
 ## Where to emit the logs.
 ## Enable the console (standard output) logs.
 ##
-## Value: off | file | console | both
-## - off: disable logs entirely
+## Value: file | console | both
 ## - file: write logs only to file
 ## - console: write logs only to standard I/O
 ## - both: write logs both to file and standard I/O

+ 2 - 13
priv/emqx.schema

@@ -457,7 +457,7 @@ end}.
 
 {mapping, "log.to", "kernel.logger", [
   {default, file},
-  {datatype, {enum, [off, file, console, both]}}
+  {datatype, {enum, [file, console, both]}}
 ]}.
 
 {mapping, "log.level", "kernel.logger", [
@@ -470,11 +470,6 @@ end}.
    {datatype, {enum, [debug, info, notice, warning, error, critical, alert, emergency, all]}}
 ]}.
 
-{mapping, "log.logger_sasl_compatible", "kernel.logger_sasl_compatible", [
-  {default, true},
-  {datatype, {enum, [true, false]}}
-]}.
-
 {mapping, "log.dir", "kernel.logger", [
   {default, "log"},
   {datatype, string}
@@ -560,12 +555,6 @@ end}.
   {datatype, string}
 ]}.
 
-{mapping, "log.sasl", "sasl.sasl_error_logger", [
-  {default, off},
-  {datatype, flag},
-  hidden
-]}.
-
 {mapping, "log.error_logger", "kernel.error_logger", [
   {default, silent},
   {datatype, {enum, [silent]}},
@@ -649,7 +638,7 @@ end}.
     %% For the default logger that outputs to console
     DefaultHandler =
         if LogTo =:= console orelse LogTo =:= both ->
-                [{handler, default, logger_std_h,
+                [{handler, console, logger_std_h,
                     #{level => LogLevel,
                       config => #{type => standard_io},
                       formatter => Formatter}}];