فهرست منبع

Define 'Otherwise' macro

Feng Lee 6 سال پیش
والد
کامیت
dfa2c2370e
3فایلهای تغییر یافته به همراه11 افزوده شده و 3 حذف شده
  1. 6 0
      include/emqx.hrl
  2. 4 1
      include/logger.hrl
  3. 1 2
      include/types.hrl

+ 6 - 0
include/emqx.hrl

@@ -17,6 +17,12 @@
 -ifndef(EMQ_X_HRL).
 -define(EMQ_X_HRL, true).
 
+%%--------------------------------------------------------------------
+%% Common
+%%--------------------------------------------------------------------
+
+-define(Otherwise, true).
+
 %%--------------------------------------------------------------------
 %% Banner
 %%--------------------------------------------------------------------

+ 4 - 1
include/logger.hrl

@@ -1,4 +1,5 @@
-%% Copyright (c) 2013-2019 EMQ Technologies Co., Ltd. All Rights Reserved.
+%%--------------------------------------------------------------------
+%% Copyright (c) 2019 EMQ Technologies Co., Ltd. All Rights Reserved.
 %%
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -11,6 +12,7 @@
 %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 %% See the License for the specific language governing permissions and
 %% limitations under the License.
+%%--------------------------------------------------------------------
 
 %% debug | info | notice | warning | error | critical | alert | emergency
 
@@ -43,3 +45,4 @@
         begin
           (logger:log(Level,#{},#{report_cb => fun(_) -> {'$logger_header'()++(Format), (Args)} end}))
         end).
+

+ 1 - 2
include/types.hrl

@@ -14,8 +14,6 @@
 %% limitations under the License.
 %%--------------------------------------------------------------------
 
--define(Otherwise, true).
-
 -type(maybe(T) :: undefined | T).
 
 -type(startlink_ret() :: {ok, pid()} | ignore | {error, term()}).
@@ -23,3 +21,4 @@
 -type(ok_or_error(Reason) :: ok | {error, Reason}).
 
 -type(ok_or_error(Value, Reason) :: {ok, Value} | {error, Reason}).
+