Interesting... Do you have control over the file format?
Can you hard-code spaces to the left and right of the (possibly non-existent) NDC? For example: DEBUG: [2006-09-07 13:48:03,155] package.foo( ) - message foo DEBUG: [2006-09-07 13:48:03,187] package.bar( ) - message bar DEBUG: [2006-09-07 13:48:03,187] package.baz( ndc baz ) - message baz DEBUG: [2006-09-07 13:48:03,202] package.quux( ) - message quux If so, this logFormat will work: LEVEL: [TIMESTAMP] LOGGER(NDC) - MESSAGE Scott Deboy COMOTIV SYSTEMS 111 SW Columbia Street Ste. 950 Portland, OR 97201 Telephone: 503.224.7496 Cell: 503.997.1367 Fax: 503.222.0185 [EMAIL PROTECTED] www.comotivsystems.com -----Original Message----- From: C. Benson Manica [mailto:[EMAIL PROTECTED] Sent: Thu 9/7/2006 1:25 PM To: [email protected] Subject: LogFilePatternReceiver not parsing the way one might expect I am using the log4j 1.3-alpha7 jar's that come bundled in the chainsaw 2 standalone DOS/Unix distribution. I have a log file with the following four entries: DEBUG: [2006-09-07 13:48:03,155] package.foo() - message foo DEBUG: [2006-09-07 13:48:03,187] package.bar() - message bar DEBUG: [2006-09-07 13:48:03,187] package.baz(ndc baz) - message baz DEBUG: [2006-09-07 13:48:03,202] package.quux() - message quux And in my chainsaw config XML I use the following for the log format for the LogFilePatternReceiver I am using to parse the log file: LEVEL [TIMESTAMP] LOGGER(NDC) - MESSAGE I would expect this to yield four log entries in Chainsaw, but I get one. The first two messages are discarded because they do not match, and the second two are combined so that the message Chainsaw displays is the first message concatenated with the entire second log entry. I gather that LogFilePatternReceiver does not like guessing whether NDC is empty or not. How does one handle situations where some piece of data may or may not be present? Or am I forced to ensure that every thread registers an NDC? -- C. Benson Manica ataru(at)sdf.lonestar.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
