@@ -67,9 +67,6 @@ defmodule Logger do
67
67
cause the message to be ignored. Keep in mind that each backend
68
68
may have its specific level, too.
69
69
70
- * `:timeout` - the timeout for sync requests in miliseconds, defaults
71
- to 5000 miliseconds.
72
-
73
70
* `:utc_log` - when `true`, uses UTC in logs. By default it uses
74
71
local time (i.e. it defaults to `false`).
75
72
@@ -369,16 +366,16 @@ defmodule Logger do
369
366
or you want to explicitly avoid embedding metadata.
370
367
"""
371
368
@ spec log ( level , message | ( ( ) -> message ) , Keyword . t ) ::
372
- :ok | { :error , :noproc } | { :error , :timeout } | { :error , term }
369
+ :ok | { :error , :noproc } | { :error , term }
373
370
def log ( level , chardata , metadata \\ [ ] ) when level in @ levels and is_list ( metadata ) do
374
- % { mode: mode , truncate: truncate , timeout: timeout ,
371
+ % { mode: mode , truncate: truncate ,
375
372
level: min_level , utc_log: utc_log? } = Logger.Config . __data__
376
373
377
374
if compare_levels ( level , min_level ) != :lt do
378
375
tuple = { Logger , truncate ( chardata , truncate ) , Logger.Utils . timestamp ( utc_log? ) ,
379
376
[ pid: self ( ) ] ++ metadata ( ) ++ metadata }
380
377
try do
381
- notify ( mode , { level , Process . group_leader ( ) , tuple } , timeout )
378
+ notify ( mode , { level , Process . group_leader ( ) , tuple } )
382
379
:ok
383
380
rescue
384
381
ArgumentError -> { :error , :noproc }
@@ -462,6 +459,6 @@ defmodule Logger do
462
459
defp truncate ( data , n ) ,
463
460
do: Logger.Utils . truncate ( to_string ( data ) , n )
464
461
465
- defp notify ( :sync , msg , timeout ) , do: GenEvent . sync_notify ( Logger , msg , timeout )
466
- defp notify ( :async , msg , _timeout ) , do: GenEvent . notify ( Logger , msg )
462
+ defp notify ( :sync , msg ) , do: GenEvent . sync_notify ( Logger , msg )
463
+ defp notify ( :async , msg ) , do: GenEvent . notify ( Logger , msg )
467
464
end
0 commit comments