@@ -338,8 +338,7 @@ public IRubyObject unknown(final ThreadContext context, final Block block) {
338
338
339
339
// def add(severity, message = nil, progname = nil, &block)
340
340
@ JRubyMethod (name = "add" , required = 1 , optional = 2 )
341
- public IRubyObject add (final ThreadContext context ,
342
- final IRubyObject [] args , final Block block ) {
341
+ public IRubyObject add (final ThreadContext context , final IRubyObject [] args , final Block block ) {
343
342
int severity = UNKNOWN ;
344
343
final IRubyObject sev = args [0 ];
345
344
if ( ! sev .isNil () ) {
@@ -471,42 +470,6 @@ private void doLog(RubyString message) {
471
470
logger .log ( message );
472
471
}
473
472
474
- // LoggerSilence API :
475
-
476
- private static boolean silencer = false ; // we're NOT true by default!
477
-
478
- @ JRubyMethod (name = "silencer" , meta = true )
479
- public static IRubyObject get_silencer (final ThreadContext context , final IRubyObject self ) {
480
- return context .runtime .newBoolean (silencer );
481
- }
482
-
483
- @ JRubyMethod (name = "silencer=" , meta = true )
484
- public static IRubyObject set_silencer (final ThreadContext context , final IRubyObject self ,
485
- final IRubyObject value ) {
486
- return context .runtime .newBoolean (silencer = value .isTrue ());
487
- }
488
-
489
- @ JRubyMethod (name = "silence" )
490
- public IRubyObject silence (final ThreadContext context , final Block block ) {
491
- return doSilence (ERROR , context , block ); // temp_level = Logger::ERROR
492
- }
493
-
494
- @ JRubyMethod (name = "silence" , required = 1 )
495
- public IRubyObject silence (final ThreadContext context , final IRubyObject temp_level , final Block block ) {
496
- final int tempLevel = (int ) temp_level .convertToInteger ("to_i" ).getLongValue ();
497
- return doSilence (tempLevel , context , block );
498
- }
499
-
500
- private IRubyObject doSilence (final int tempLevel , final ThreadContext context , final Block block ) {
501
- if ( silencer ) {
502
- // not implemented - on purpose!
503
- return block .yield (context , this );
504
- }
505
- else {
506
- return block .yield (context , this );
507
- }
508
- }
509
-
510
473
// (old) BufferedLogger API compatibility :
511
474
512
475
@ JRubyMethod (name = "flush" , alias = { "auto_flushing" , "auto_flushing=" })
0 commit comments