Thanks for reply James.

Let me make you more clear.

I want Separate Level SQL and i want to enable/disable
it with Flag(isSQLEnable),regardless of current
Priority.

I dont have any code level access to my
application.(As i mensioned we are using commons
logging extension)so i can not create separate logger
in the code.

if i create separate logger in properties file with
name say 

log4j.logger.SQL=SQL,<Appender list...>
..........

will it log request(with SQL Level)coming from any
package(say my package is com.app.test will it accepts
SQL log request generated from this package also)??

Hope so i am able to make you more clear!!!
Thanks in advance.

--- James Stauffer <[EMAIL PROTECTED]> wrote:

> I don't quite understand what you are trying to do
> but it appears that
> you don't want the SQL level to be in the same
> ordering as the other
> levels.
> Would it work to just send all SQL logs to a
> separate logger?  Then
> you could turn them on or off separately from the
> level of the rest of
> the logs.
> 
> On 4/19/06, Meera Mehta <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> > In my application i want custom level SQL(which
> logs
> > all SQL statements.
> >
> > I have one flag isSQLEnable which is controlling
> > behaviour of SQL statement logging.
> >
> > When flag is On:
> > Priority of rootLogger is
> > either (1)SQL  OR  (2) DEBUG(or any other valid
> Level)
> >
> > 1) when Priority is SQL i want to generate Warning
> > plus SQL logs (SQL statements only).
> >
> > 2) When priority is DEBUG
> > I want to generate All logs plus SQL logs.
> >
> > When flag is OFF:
> >
> > Priority of rootLogger is
> > either (1)SQL  OR  (2) DEBUG(or any other valid
> Level)
> >
> > 1) when priority of rootLogger is SQL
> > I want warning and Empty log file(all msgs should
> be
> > discarded).
> > 2) priority of rootLogger is say DEBUG
> > I want Normal logs according to priority without
> SQL
> > logs(because flag is OFF).
> >
> > I have my custom level and property configurator
> > class.
> >
> > My question is that am i on right track or is
> there
> > any better way to do this?????
> >
> > If i am right then how can i dynamically assign
> > priority to SQL level??
> >
> > please guide me.
> >
> >
> > Note:
> > isSQLEnable is my custom key which i have added,
> for
> > that i have extended PropertyConfigurator class.
> > I am using log4j.properties as config file.
> > I am also using commons loggin.
> > I dont have code level access to any of my client
> > class.
> >
> > thanks
> > Meera
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> James Stauffer
> Are you good? Take the test at
> http://www.livingwaters.com/good/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to