Browse Source

fx: 代码整理

master
SisMaker 3 years ago
parent
commit
899a4fb56e
3 changed files with 3 additions and 4 deletions
  1. +2
    -2
      src/eLog.erl
  2. +0
    -1
      src/errLogger/lgErrLoggerH.erl
  3. +1
    -1
      src/testl.erl

+ 2
- 2
src/eLog.erl View File

@ -505,13 +505,13 @@ add_trace_to_loglevel_config(Trace, Sink) ->
unsafeFormat(Fmt, Args) -> unsafeFormat(Fmt, Args) ->
try io_lib:format(Fmt, Args) try io_lib:format(Fmt, Args)
catch catch
_:_ -> io_lib:format("FORMAT ERROR: ~p ~p", [Fmt, Args])
_:_ -> io_lib:format("FORMAT ERROR SAFE: ~p ~p", [Fmt, Args])
end. end.
safeFormat(Fmt, Args, Limit) -> safeFormat(Fmt, Args, Limit) ->
try eFmt:formatBin(Fmt, Args, [{charsLimit, Limit}]) try eFmt:formatBin(Fmt, Args, [{charsLimit, Limit}])
catch catch
_:_ -> eFmt:formatBin(<<"FORMAT ERROR: ~p ~p">>, [Fmt, Args], [{charsLimit, Limit}])
_:_ -> eFmt:formatBin(<<"FORMAT ERROR UNSAFE: ~p ~p">>, [Fmt, Args], [{charsLimit, Limit}])
end. end.
%% @private Print the format string `Fmt' with `Args' without a size limit. %% @private Print the format string `Fmt' with `Args' without a size limit.

+ 0
- 1
src/errLogger/lgErrLoggerH.erl View File

@ -10,7 +10,6 @@
-compile(inline). -compile(inline).
-compile({inline_size, 128}). -compile({inline_size, 128}).
-compile([export_all]).
-export([ -export([
setHighWater/1 setHighWater/1

+ 1
- 1
src/testl.erl View File

@ -12,5 +12,5 @@ tt() ->
?lgError("IMYYYYYYYYYYYYYYY111 好家伙"). ?lgError("IMYYYYYYYYYYYYYYY111 好家伙").
ee() -> ee() ->
error_logger:info_msg("fdsfsdfsfdsfs1111111111111 ").
error_logger:error_msg("fdsfsdfsfdsfs1111111111111 ").

Loading…
Cancel
Save