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]
