Thursday, July 30, 2015

list in perl

we can use the word list operator (qw||) to create lists, and any non-word characters or parentheses to delimit the list, there lists for instance, are identical.

qw|a b c d|
qw/a b c d/
qw[a b c d}


Wednesday, July 29, 2015

perl variable

to declare a global variable you type $var; or our $var;
and to declare a local variable you type my $var;

Thursday, July 23, 2015

go though logback root and appender structures remove an Appender manually

LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
//StatusPrinter.print(lc);
List strList = new ArrayList();
    for (ch.qos.logback.classic.Logger log : lc.getLoggerList()) {
      if(log.getLevel() != null || hasAppenders(log)) {
    System.out.println("LOG:" + log.getName());
   
    Iterator> appenders = log.iteratorForAppenders();
    while(appenders.hasNext()){
    Appender ap = appenders.next();
    System.out.println("APPENDER:" + ap.getName());
    }
   
        strList.add(log.getName());
      }
    }