struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anand M S" <anand...@hotmail.com>
Subject Re: jdk14 log
Date Wed, 19 Mar 2003 16:12:19 GMT
I'm also having probel with jdk logging, I'm not sure how the the following
methods of Logger should work

log(Level level, String msg, Object param1);
log(Level level, String msg, Object[] param1);

If I pass array of objects as a parameters to this method, my understanding
is it should print the
 toString representation to the handlers, but it's not. Documentation says
param1 in above method is parameter to the message, msg is a String, how can
we pass parameter to  string?

any ideas?

Thanks.

----- Original Message -----
From: "Navjot Singh" <navjot.s@net4india.net>
To: "Vic Cekvenich" <vc@basebeans.com>
Cc: "Struts Users List" <struts-user@jakarta.apache.org>
Sent: Wednesday, March 19, 2003 3:07 AM
Subject: Re: jdk14 log


>
> Hi Vic,
>
> Properties File Attached. Remember, the logging takes the formatter
> specified in props if called from command prompt.
> When i called from servlet, it take XMLFormatter by default. However, if
you
> give BasicFormatter, it picks up SimpleFormatter.
>
> It just refuses to pick my customer Formatter from Servlet.
>
> Use this to read file
> =============
>    LogManager logman = LogManager.getLogManager();
>    FileInputStream in = new FileInputStream(filename);
>    logman.readConfiguration(in);
>
> Use this to test the config set
> ====================
>
>   LogManager manager = LogManager.getLogManager();
>   // Get all defined loggers
>   Enumeration names = manager.getLoggerNames();
>   while (names.hasMoreElements())
>   {
>        String loggername = (String)names.nextElement();
>        Logger logger = manager.getLogger(loggername);
>
>        System.out.println("-----------------------");
>        System.out.println("Logger name: >" + logger.getName() + "<");
>        System.out.println("Logger level: " + logger.getLevel());
>
>        Handler[] hs = logger.getHandlers();
>        for(int i=0;i<hs.length;i++)
>        {
>             System.out.println("\t" + hs[i].toString() + "#" +
> hs[i].getFormatter() + "->" + hs[i].getEncoding());
>        }
>   }
>
> ----- Original Message -----
> From: "Vic Cekvenich" <vc@basebeans.com>
> To: "Navjot Singh" <navjot.s@net4india.net>
> Sent: Tuesday, March 18, 2003 10:46 PM
> Subject: jdk14 log
>
>
> | Can you send me the properties files and the command that read it?
> | I am trying to get JDK1.4 log to work in struts.
> | thanks
> | .V
> |
> |
> |
>
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message