主页

索引

模块索引

搜索页面

parse_transform实例

lager_transform:parse_transform/2

参数实例:

 1%%%-------------------------------------------------------------------
 2%%% @author zhaoweiguo
 3%%% @copyright (C) 2018, <COMPANY>
 4%%% @doc
 5%%%
 6%%% @end
 7%%% Created : 25. 七月 2018 下午1:17
 8%%%-------------------------------------------------------------------
 9-module(demo_lager_server).
10-author("zhaoweiguo").
11
12-behaviour(gen_server).
13
14%% API
15-export([start_link/0, stop/0]).
16
17%% gen_server callbacks
18-export([init/1,
19  handle_call/3,
20  handle_cast/2,
21  handle_info/2,
22  terminate/2,
23  code_change/3]).
24
25
26-record(state, {}).
27-define(DELAY, 750).
28
29start_link() ->
30  gen_server:start_link(?MODULE, [], []).
31
32stop() -> gen_server:call(self(), stop).
33
34
35
36init([]) ->
37  lager:info("client process start"),
38  {ok, #state{},1000}.  % 1秒执行一次gen_info()
39  %{ok, #state{}}.
40
41handle_call(_Request, _From, State) ->
42  lager:info("handle_call _Request = ~p",[_Request]),
43  {reply, ok, State}.
44
45handle_cast(_Request, State) ->
46  lager:info("handle_cast _Request",[_Request]),
47  {noreply, State}.
48
49handle_info(_Info, State) ->
50  F = fun(_)->
51    lager:info("=======>> handle_info _Info = ~p",[_Info]),
52%%    lager:debug("=======>> handle_info _Info = ~p",[_Info]),
53%%    lager:error("=======>> handle_info _Info = ~p",[_Info]),
54%%    lager:notice("=======>> handle_info _Info = ~p",[_Info]),
55%%    lager:warning("=======>> handle_info _Info = ~p",[_Info]),
56%%    lager:critical("=======>> handle_info _Info = ~p",[_Info]),
57%%    lager:alert("=======>> handle_info _Info = ~p",[_Info]),
58%%    lager:emergency("=======>> handle_info _Info = ~p",[_Info]),
59    ok
60      end,
61  % F2 = spawn(F),  % 并发执行用这个
62  lists:foreach(F,lists:seq(1,100)),
63  {noreply, State,100}.
64
65
66terminate(_Reason, _State) ->
67  lager:info("terminate"),
68  ok.
69
70code_change(_OldVsn, State, _Extra) ->
71  {ok, State}.

转化前文件:

 110:52:05.366528 <0.5926.0> lager_transform:parse_transform([{attribute,1,file,{"lib/demo_lager-0.1.0/src/demo_lager_server.erl",1}},
 2 {attribute,9,module,demo_lager_server},
 3 {attribute,10,author,"zhaoweiguo"},
 4 {attribute,12,behaviour,gen_server},
 5 {attribute,15,export,[{start_link,0},{stop,0}]},
 6 {attribute,18,export,
 7     [{init,1},
 8      {handle_call,3},
 9      {handle_cast,2},
10      {handle_info,2},
11      {terminate,2},
12      {code_change,3}]},
13 {attribute,26,record,{state,[]}},
14 {function,29,start_link,0,
15     [{clause,29,[],[],
16          [{call,30,
17               {remote,30,{atom,30,gen_server},{atom,30,start_link}},
18               [{atom,30,demo_lager_server},{nil,30},{nil,30}]}]}]},
19 {function,32,stop,0,
20     [{clause,32,[],[],
21          [{call,32,
22               {remote,32,{atom,32,gen_server},{atom,32,call}},
23               [{call,32,{atom,32,self},[]},{atom,32,stop}]}]}]},
24 {function,36,init,1,
25     [{clause,36,
26          [{nil,36}],
27          [],
28          [{call,37,
29               {remote,37,{atom,37,lager},{atom,37,info}},
30               [{string,37,"client process start"}]},
31           {tuple,38,
32               [{atom,38,ok},{record,38,state,[]},{integer,38,1000}]}]}]},
33 {function,41,handle_call,3,
34     [{clause,41,
35          [{var,41,'_Request'},{var,41,'_From'},{var,41,'State'}],
36          [],
37          [{call,42,
38               {remote,42,{atom,42,lager},{atom,42,info}},
39               [{string,42,"handle_call _Request = ~p"},
40                {cons,42,{var,42,'_Request'},{nil,42}}]},
41           {tuple,43,[{atom,43,reply},{atom,43,ok},{var,43,'State'}]}]}]},
42 {function,45,handle_cast,2,
43     [{clause,45,
44          [{var,45,'_Request'},{var,45,'State'}],
45          [],
46          [{call,46,
47               {remote,46,{atom,46,lager},{atom,46,info}},
48               [{string,46,"handle_cast _Request"},
49                {cons,46,{var,46,'_Request'},{nil,46}}]},
50           {tuple,47,[{atom,47,noreply},{var,47,'State'}]}]}]},
51 {function,49,handle_info,2,
52     [{clause,49,
53          [{var,49,'_Info'},{var,49,'State'}],
54          [],
55          [{match,50,
56               {var,50,'F'},
57               {'fun',50,
58                   {clauses,
59                       [{clause,50,
60                            [{var,50,'_'}],
61                            [],
62                            [{call,51,
63                                 {remote,51,{atom,51,lager},{atom,51,info}},
64                                 [{string,51,
65                                      "=======>> handle_info _Info=======>> handle_info _Info = ~p"},
66                                  {cons,51,{var,51,'_Info'},{nil,51}}]},
67                             {atom,59,ok}]}]}}},
68           {call,62,
69               {remote,62,{atom,62,lists},{atom,62,foreach}},
70               [{var,62,'F'},
71                {call,62,
72                    {remote,62,{atom,62,lists},{atom,62,seq}},
73                    [{integer,62,1},{integer,62,100}]}]},
74           {tuple,63,
75               [{atom,63,noreply},{var,63,'State'},{integer,63,100}]}]}]},
76 {function,66,terminate,2,
77     [{clause,66,
78          [{var,66,'_Reason'},{var,66,'_State'}],
79          [],
80          [{call,67,
81               {remote,67,{atom,67,lager},{atom,67,info}},
82               [{string,67,"terminate"}]},
83           {atom,68,ok}]}]},
84 {function,70,code_change,3,
85     [{clause,70,
86          [{var,70,'_OldVsn'},{var,70,'State'},{var,70,'_Extra'}],
87          [],
88          [{tuple,71,[{atom,71,ok},{var,71,'State'}]}]}]},
89 {eof,78}], [report_errors,report_warnings,{parse_transform,lager_transform}])

转化后文件:

  112:22:20.784781 <0.412.0> lager_transform:insert_record_attribute([{eof,78},
  2 {function,70,code_change,3,
  3  [{clause,70,
  4    [{var,70,'_OldVsn'},{var,70,'State'},{var,70,'_Extra'}],
  5    [],
  6    [{tuple,71,[{atom,71,ok},{var,71,'State'}]}]}]},
  7 {function,66,terminate,2,
  8  [{clause,66,
  9    [{var,66,'_Reason'},{var,66,'_State'}],
 10    [],
 11    [{'case',67,
 12      {tuple,67,
 13       [{call,67,{atom,67,whereis},[{atom,67,lager_event}]},
 14        {call,67,{atom,67,whereis},[{atom,67,lager_event}]},
 15        {call,67,
 16         {remote,67,{atom,67,lager_config},{atom,67,get}},
 17         [{tuple,67,[{atom,67,lager_event},{atom,67,loglevel}]},
 18          {tuple,67,[{integer,67,0},{nil,67}]}]}]},
 19      [{clause,67,
 20        [{tuple,67,[{atom,67,undefined},{atom,67,undefined},{var,67,'_'}]}],
 21        [],
 22        [{call,67,
 23          {'fun',67,
 24           {clauses,
 25            [{clause,67,[],[],
 26              [{tuple,67,[{atom,67,error},{atom,67,lager_not_running}]}]}]}},
 27          []}]},
 28       {clause,67,
 29        [{tuple,67,[{atom,67,undefined},{var,67,'_'},{var,67,'_'}]}],
 30        [],
 31        [{call,67,
 32          {'fun',67,
 33           {clauses,
 34            [{clause,67,[],[],
 35              [{tuple,67,
 36                [{atom,67,error},
 37                 {tuple,67,
 38                  [{atom,67,sink_not_configured},
 39                   {atom,67,lager_event}]}]}]}]}},
 40          []}]},
 41       {clause,67,
 42        [{tuple,67,
 43          [{var,67,'__Piddemo_lager_server67'},
 44           {var,67,'_'},
 45           {tuple,67,
 46            [{var,67,'__Leveldemo_lager_server67'},
 47             {var,67,'__Tracesdemo_lager_server67'}]}]}],
 48        [[{op,67,'orelse',
 49           {op,67,'/=',
 50            {op,67,'band',
 51             {var,67,'__Leveldemo_lager_server67'},
 52             {integer,67,64}},
 53            {integer,67,0}},
 54           {op,67,'/=',{var,67,'__Tracesdemo_lager_server67'},{nil,67}}}]],
 55        [{call,67,
 56          {remote,67,{atom,67,lager},{atom,67,do_log}},
 57          [{atom,67,info},
 58           {cons,67,
 59            {tuple,67,[{atom,67,application},{atom,67,demo_lager}]},
 60            {cons,67,
 61             {tuple,67,[{atom,67,module},{atom,67,demo_lager_server}]},
 62             {cons,67,
 63              {tuple,67,[{atom,67,function},{atom,67,terminate}]},
 64              {cons,67,
 65               {tuple,67,[{atom,67,line},{integer,67,67}]},
 66               {cons,67,
 67                {tuple,67,
 68                 [{atom,67,pid},
 69                  {call,67,
 70                   {atom,67,pid_to_list},
 71                   [{call,67,{atom,67,self},[]}]}]},
 72                {cons,67,
 73                 {tuple,67,[{atom,67,node},{call,67,{atom,67,node},[]}]},
 74                 {call,67,{remote,67,{atom,67,lager},{atom,67,md}},[]}}}}}}},
 75           {string,67,"terminate"},
 76           {atom,67,none},
 77           {integer,67,4096},
 78           {integer,67,64},
 79           {var,67,'__Leveldemo_lager_server67'},
 80           {var,67,'__Tracesdemo_lager_server67'},
 81           {atom,67,lager_event},
 82           {var,67,'__Piddemo_lager_server67'}]}]},
 83       {clause,67,[{var,67,'_'}],[],[{atom,67,ok}]}]},
 84     {atom,68,ok}]}]},
 85 {function,49,handle_info,2,
 86  [{clause,49,
 87    [{var,49,'_Info'},{var,49,'State'}],
 88    [],
 89    [{match,50,
 90      {var,50,'F'},
 91      {'fun',50,
 92       {clauses,
 93        [{clause,50,
 94          [{var,50,'_'}],
 95          [],
 96          [{'case',51,
 97            {tuple,51,
 98             [{call,51,{atom,51,whereis},[{atom,51,lager_event}]},
 99              {call,51,{atom,51,whereis},[{atom,51,lager_event}]},
100              {call,51,
101               {remote,51,{atom,51,lager_config},{atom,51,get}},
102               [{tuple,51,[{atom,51,lager_event},{atom,51,loglevel}]},
103                {tuple,51,[{integer,51,0},{nil,51}]}]}]},
104            [{clause,51,
105              [{tuple,51,
106                [{atom,51,undefined},{atom,51,undefined},{var,51,'_'}]}],
107              [],
108              [{call,51,
109                {'fun',51,
110                 {clauses,
111                  [{clause,51,[],[],
112                    [{tuple,51,
113                      [{atom,51,error},{atom,51,lager_not_running}]}]}]}},
114                []}]},
115             {clause,51,
116              [{tuple,51,[{atom,51,undefined},{var,51,'_'},{var,51,'_'}]}],
117              [],
118              [{call,51,
119                {'fun',51,
120                 {clauses,
121                  [{clause,51,[],[],
122                    [{tuple,51,
123                      [{atom,51,error},
124                       {tuple,51,
125                        [{atom,51,sink_not_configured},
126                         {atom,51,lager_event}]}]}]}]}},
127                []}]},
128             {clause,51,
129              [{tuple,51,
130                [{var,51,'__Piddemo_lager_server51'},
131                 {var,51,'_'},
132                 {tuple,51,
133                  [{var,51,'__Leveldemo_lager_server51'},
134                   {var,51,'__Tracesdemo_lager_server51'}]}]}],
135              [[{op,51,'orelse',
136                 {op,51,'/=',
137                  {op,51,'band',
138                   {var,51,'__Leveldemo_lager_server51'},
139                   {integer,51,64}},
140                  {integer,51,0}},
141                 {op,51,'/=',
142                  {var,51,'__Tracesdemo_lager_server51'},
143                  {nil,51}}}]],
144              [{call,51,
145                {remote,51,{atom,51,lager},{atom,51,do_log}},
146                [{atom,51,info},
147                 {cons,51,
148                  {tuple,51,[{atom,51,application},{atom,51,demo_lager}]},
149                  {cons,51,
150                   {tuple,51,[{atom,51,module},{atom,51,demo_lager_server}]},
151                   {cons,51,
152                    {tuple,51,[{atom,51,function},{atom,51,handle_info}]},
153                    {cons,51,
154                     {tuple,51,[{atom,51,line},{integer,51,51}]},
155                     {cons,51,
156                      {tuple,51,
157                       [{atom,51,pid},
158                        {call,51,
159                         {atom,51,pid_to_list},
160                         [{call,51,{atom,51,self},[]}]}]},
161                      {cons,51,
162                       {tuple,51,[{atom,51,node},{call,51,{atom,51,node},[]}]},
163                       {call,51,
164                        {remote,51,{atom,51,lager},{atom,51,md}},
165                        []}}}}}}},
166                 {string,51,
167                  "=======>> handle_info _Info=======>> handle_info _Info = ~p"},
168                 {cons,51,{var,51,'_Info'},{nil,51}},
169                 {integer,51,4096},
170                 {integer,51,64},
171                 {var,51,'__Leveldemo_lager_server51'},
172                 {var,51,'__Tracesdemo_lager_server51'},
173                 {atom,51,lager_event},
174                 {var,51,'__Piddemo_lager_server51'}]}]},
175             {clause,51,[{var,51,'_'}],[],[{atom,51,ok}]}]},
176           {atom,59,ok}]}]}}},
177     {call,62,
178      {remote,62,{atom,62,lists},{atom,62,foreach}},
179      [{var,62,'F'},
180       {call,62,
181        {remote,62,{atom,62,lists},{atom,62,seq}},
182        [{integer,62,1},{integer,62,100}]}]},
183     {tuple,63,[{atom,63,noreply},{var,63,'State'},{integer,63,100}]}]}]},
184 {function,45,handle_cast,2,
185  [{clause,45,
186    [{var,45,'_Request'},{var,45,'State'}],
187    [],
188    [{'case',46,
189      {tuple,46,
190       [{call,46,{atom,46,whereis},[{atom,46,lager_event}]},
191        {call,46,{atom,46,whereis},[{atom,46,lager_event}]},
192        {call,46,
193         {remote,46,{atom,46,lager_config},{atom,46,get}},
194         [{tuple,46,[{atom,46,lager_event},{atom,46,loglevel}]},
195          {tuple,46,[{integer,46,0},{nil,46}]}]}]},
196      [{clause,46,
197        [{tuple,46,[{atom,46,undefined},{atom,46,undefined},{var,46,'_'}]}],
198        [],
199        [{call,46,
200          {'fun',46,
201           {clauses,
202            [{clause,46,[],[],
203              [{tuple,46,[{atom,46,error},{atom,46,lager_not_running}]}]}]}},
204          []}]},
205       {clause,46,
206        [{tuple,46,[{atom,46,undefined},{var,46,'_'},{var,46,'_'}]}],
207        [],
208        [{call,46,
209          {'fun',46,
210           {clauses,
211            [{clause,46,[],[],
212              [{tuple,46,
213                [{atom,46,error},
214                 {tuple,46,
215                  [{atom,46,sink_not_configured},
216                   {atom,46,lager_event}]}]}]}]}},
217          []}]},
218       {clause,46,
219        [{tuple,46,
220          [{var,46,'__Piddemo_lager_server46'},
221           {var,46,'_'},
222           {tuple,46,
223            [{var,46,'__Leveldemo_lager_server46'},
224             {var,46,'__Tracesdemo_lager_server46'}]}]}],
225        [[{op,46,'orelse',
226           {op,46,'/=',
227            {op,46,'band',
228             {var,46,'__Leveldemo_lager_server46'},
229             {integer,46,64}},
230            {integer,46,0}},
231           {op,46,'/=',{var,46,'__Tracesdemo_lager_server46'},{nil,46}}}]],
232        [{call,46,
233          {remote,46,{atom,46,lager},{atom,46,do_log}},
234          [{atom,46,info},
235           {cons,46,
236            {tuple,46,[{atom,46,application},{atom,46,demo_lager}]},
237            {cons,46,
238             {tuple,46,[{atom,46,module},{atom,46,demo_lager_server}]},
239             {cons,46,
240              {tuple,46,[{atom,46,function},{atom,46,handle_cast}]},
241              {cons,46,
242               {tuple,46,[{atom,46,line},{integer,46,46}]},
243               {cons,46,
244                {tuple,46,
245                 [{atom,46,pid},
246                  {call,46,
247                   {atom,46,pid_to_list},
248                   [{call,46,{atom,46,self},[]}]}]},
249                {cons,46,
250                 {tuple,46,[{atom,46,node},{call,46,{atom,46,node},[]}]},
251                 {call,46,{remote,46,{atom,46,lager},{atom,46,md}},[]}}}}}}},
252           {string,46,"handle_cast _Request"},
253           {cons,46,{var,46,'_Request'},{nil,46}},
254           {integer,46,4096},
255           {integer,46,64},
256           {var,46,'__Leveldemo_lager_server46'},
257           {var,46,'__Tracesdemo_lager_server46'},
258           {atom,46,lager_event},
259           {var,46,'__Piddemo_lager_server46'}]}]},
260       {clause,46,[{var,46,'_'}],[],[{atom,46,ok}]}]},
261     {tuple,47,[{atom,47,noreply},{var,47,'State'}]}]}]},
262 {function,41,handle_call,3,
263  [{clause,41,
264    [{var,41,'_Request'},{var,41,'_From'},{var,41,'State'}],
265    [],
266    [{'case',42,
267      {tuple,42,
268       [{call,42,{atom,42,whereis},[{atom,42,lager_event}]},
269        {call,42,{atom,42,whereis},[{atom,42,lager_event}]},
270        {call,42,
271         {remote,42,{atom,42,lager_config},{atom,42,get}},
272         [{tuple,42,[{atom,42,lager_event},{atom,42,loglevel}]},
273          {tuple,42,[{integer,42,0},{nil,42}]}]}]},
274      [{clause,42,
275        [{tuple,42,[{atom,42,undefined},{atom,42,undefined},{var,42,'_'}]}],
276        [],
277        [{call,42,
278          {'fun',42,
279           {clauses,
280            [{clause,42,[],[],
281              [{tuple,42,[{atom,42,error},{atom,42,lager_not_running}]}]}]}},
282          []}]},
283       {clause,42,
284        [{tuple,42,[{atom,42,undefined},{var,42,'_'},{var,42,'_'}]}],
285        [],
286        [{call,42,
287          {'fun',42,
288           {clauses,
289            [{clause,42,[],[],
290              [{tuple,42,
291                [{atom,42,error},
292                 {tuple,42,
293                  [{atom,42,sink_not_configured},
294                   {atom,42,lager_event}]}]}]}]}},
295          []}]},
296       {clause,42,
297        [{tuple,42,
298          [{var,42,'__Piddemo_lager_server42'},
299           {var,42,'_'},
300           {tuple,42,
301            [{var,42,'__Leveldemo_lager_server42'},
302             {var,42,'__Tracesdemo_lager_server42'}]}]}],
303        [[{op,42,'orelse',
304           {op,42,'/=',
305            {op,42,'band',
306             {var,42,'__Leveldemo_lager_server42'},
307             {integer,42,64}},
308            {integer,42,0}},
309           {op,42,'/=',{var,42,'__Tracesdemo_lager_server42'},{nil,42}}}]],
310        [{call,42,
311          {remote,42,{atom,42,lager},{atom,42,do_log}},
312          [{atom,42,info},
313           {cons,42,
314            {tuple,42,[{atom,42,application},{atom,42,demo_lager}]},
315            {cons,42,
316             {tuple,42,[{atom,42,module},{atom,42,demo_lager_server}]},
317             {cons,42,
318              {tuple,42,[{atom,42,function},{atom,42,handle_call}]},
319              {cons,42,
320               {tuple,42,[{atom,42,line},{integer,42,42}]},
321               {cons,42,
322                {tuple,42,
323                 [{atom,42,pid},
324                  {call,42,
325                   {atom,42,pid_to_list},
326                   [{call,42,{atom,42,self},[]}]}]},
327                {cons,42,
328                 {tuple,42,[{atom,42,node},{call,42,{atom,42,node},[]}]},
329                 {call,42,{remote,42,{atom,42,lager},{atom,42,md}},[]}}}}}}},
330           {string,42,"handle_call _Request = ~p"},
331           {cons,42,{var,42,'_Request'},{nil,42}},
332           {integer,42,4096},
333           {integer,42,64},
334           {var,42,'__Leveldemo_lager_server42'},
335           {var,42,'__Tracesdemo_lager_server42'},
336           {atom,42,lager_event},
337           {var,42,'__Piddemo_lager_server42'}]}]},
338       {clause,42,[{var,42,'_'}],[],[{atom,42,ok}]}]},
339     {tuple,43,[{atom,43,reply},{atom,43,ok},{var,43,'State'}]}]}]},
340 {function,36,init,1,
341  [{clause,36,
342    [{nil,36}],
343    [],
344    [{'case',37,
345      {tuple,37,
346       [{call,37,{atom,37,whereis},[{atom,37,lager_event}]},
347        {call,37,{atom,37,whereis},[{atom,37,lager_event}]},
348        {call,37,
349         {remote,37,{atom,37,lager_config},{atom,37,get}},
350         [{tuple,37,[{atom,37,lager_event},{atom,37,loglevel}]},
351          {tuple,37,[{integer,37,0},{nil,37}]}]}]},
352      [{clause,37,
353        [{tuple,37,[{atom,37,undefined},{atom,37,undefined},{var,37,'_'}]}],
354        [],
355        [{call,37,
356          {'fun',37,
357           {clauses,
358            [{clause,37,[],[],
359              [{tuple,37,[{atom,37,error},{atom,37,lager_not_running}]}]}]}},
360          []}]},
361       {clause,37,
362        [{tuple,37,[{atom,37,undefined},{var,37,'_'},{var,37,'_'}]}],
363        [],
364        [{call,37,
365          {'fun',37,
366           {clauses,
367            [{clause,37,[],[],
368              [{tuple,37,
369                [{atom,37,error},
370                 {tuple,37,
371                  [{atom,37,sink_not_configured},
372                   {atom,37,lager_event}]}]}]}]}},
373          []}]},
374       {clause,37,
375        [{tuple,37,
376          [{var,37,'__Piddemo_lager_server37'},
377           {var,37,'_'},
378           {tuple,37,
379            [{var,37,'__Leveldemo_lager_server37'},
380             {var,37,'__Tracesdemo_lager_server37'}]}]}],
381        [[{op,37,'orelse',
382           {op,37,'/=',
383            {op,37,'band',
384             {var,37,'__Leveldemo_lager_server37'},
385             {integer,37,64}},
386            {integer,37,0}},
387           {op,37,'/=',{var,37,'__Tracesdemo_lager_server37'},{nil,37}}}]],
388        [{call,37,
389          {remote,37,{atom,37,lager},{atom,37,do_log}},
390          [{atom,37,info},
391           {cons,37,
392            {tuple,37,[{atom,37,application},{atom,37,demo_lager}]},
393            {cons,37,
394             {tuple,37,[{atom,37,module},{atom,37,demo_lager_server}]},
395             {cons,37,
396              {tuple,37,[{atom,37,function},{atom,37,init}]},
397              {cons,37,
398               {tuple,37,[{atom,37,line},{integer,37,37}]},
399               {cons,37,
400                {tuple,37,
401                 [{atom,37,pid},
402                  {call,37,
403                   {atom,37,pid_to_list},
404                   [{call,37,{atom,37,self},[]}]}]},
405                {cons,37,
406                 {tuple,37,[{atom,37,node},{call,37,{atom,37,node},[]}]},
407                 {call,37,{remote,37,{atom,37,lager},{atom,37,md}},[]}}}}}}},
408           {string,37,"client process start"},
409           {atom,37,none},
410           {integer,37,4096},
411           {integer,37,64},
412           {var,37,'__Leveldemo_lager_server37'},
413           {var,37,'__Tracesdemo_lager_server37'},
414           {atom,37,lager_event},
415           {var,37,'__Piddemo_lager_server37'}]}]},
416       {clause,37,[{var,37,'_'}],[],[{atom,37,ok}]}]},
417     {tuple,38,[{atom,38,ok},{record,38,state,[]},{integer,38,1000}]}]}]},
418 {function,32,stop,0,
419  [{clause,32,[],[],
420    [{call,32,
421      {remote,32,{atom,32,gen_server},{atom,32,call}},
422      [{call,32,{atom,32,self},[]},{atom,32,stop}]}]}]},
423 {function,29,start_link,0,
424  [{clause,29,[],[],
425    [{call,30,
426      {remote,30,{atom,30,gen_server},{atom,30,start_link}},
427      [{atom,30,demo_lager_server},{nil,30},{nil,30}]}]}]},
428 {attribute,26,record,{state,[]}},
429 {attribute,18,export,
430  [{init,1},
431   {handle_call,3},
432   {handle_cast,2},
433   {handle_info,2},
434   {terminate,2},
435   {code_change,3}]},
436 {attribute,15,export,[{start_link,0},{stop,0}]},
437 {attribute,12,behaviour,gen_server},
438 {attribute,10,author,"zhaoweiguo"},
439 {attribute,9,module,demo_lager_server},
440 {attribute,1,file,{"lib/demo_lager-0.1.0/src/demo_lager_server.erl",1}}])
441Recon tracer rate limit tripped.
442{ok,demo_lager_server}

主页

索引

模块索引

搜索页面