Menu

#12 Exception thrown if log.handler.out=false

bug
open
nobody
api (1)
5
2013-02-19
2001-02-09
Anonymous
No

I command line specifies -Dlog.handler.out=false to make console output disabled, exception is thrown at line 1655
(Log::initialize function).

Fix would be to replace the line
addHandler(key.substring(begin, end));
with
addHandler(name);

Thanks,

Vinay

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I did this but now it will log to out.log file. I want to
    do all logging via JDBC since the IO is a high price via a
    file. I assum that there is a way to turn off the
    system.out and the out.log file. Does anyone have any
    suggestions?

     
  • Kyle Dawson

    Kyle Dawson - 2001-04-21

    Logged In: YES
    user_id=201742

    By doing the above, it foces a out.log file to be created.
    Yes it does stop the writting out to the console, but it
    now writes it to the out.log. To correct this I modifed
    grace.log.Log.addHandler(String name).
    added a check at the beging of the method, if it passes the
    test, continue with the method. If if fails, skip the
    method entirely.

    if (!name.equalsIgnoreCase(standardOutName) ||
    System.getProperty(handlerPropertyPrefix +
    standardOutName, "").equalsIgnoreCase("true"))

    Thanks
    Kyle

     

Log in to post a comment.