Re: Question regarding JSON Template timestamp rendering

2021-11-03 Thread Andrew Harris (andharr2)
​Volkan,

Happy to hear that you have recovered! Thank you also for the info on the 
2.15.0 release, I'm looking forward to it for several reasons.

I'll try to answer your questions:

> How do you purpose JTL?
My organization is looking to standardize application logging across our 
platform. Our goal is to reduce the internal overhead of monitoring, searching, 
and sense-making with logs. As an early pass toward this, we have developed an 
application-based log config using Log4j JTL, that conforms to a standard model.

> What do you use for the log storage engine? ELK?
Splunk is the storage engine that I use most often.

> Which appender (pipeline?) do you use to make your way from the application 
> to your log sink?
My main development work for logging right now is on containerized 
applications, so stdout and the ConsoleAppender are what I use. All stdout logs 
forward to our aggregators. This follows current Kubernetes guidance that 
containers should write logs to stdout, for instance.

> What is the scale?
I hope it's enough to say: we run applications of varying sizes and request 
volumes in a large-enterprise, service-oriented, cloud-based, containerized 
architecture. We plan to support thousands of containerized application 
instances using this standard log format, to include Java applications.

> Do you have any Log4j/JTL customizations?
Yes, a couple at the moment. To support a numeric field derived from an 
existing Resolver, we wrote a simple custom Lookup that roughly translates the 
Resolver's output. The Lookup isn't perfect, because it exclusively renders as 
a String and the desired value is numeric, and because the mapping between the 
existing Resolver and the desired value is not 1:1. I would like to rewrite 
this translation as a custom Resolver in Log4j 2.15.0, to render the value 
correctly as numeric, to avoid the garbage hit of the Lookup, and maybe to 
provide additional data.

I also would like to implement a custom Resolver to render several nested JSON 
fields. Right now, we render these nested fields from a combination of fixed 
environment variable Lookups and the MDC Resolver. We have a regular expression 
with a simple negative lookahead regex on the MDC Resolver to avoid duplicating 
MDC values that are rendered elsewhere. It would be nice to simplify these 
assumptions down to one or two custom Resolvers, which could be dropped in much 
like the current MDC resolver. I also might have a use-case for the Log4j 
Kubernetes Lookup in the near future.

I hope these responses help. Happy to talk in greater detail as well. Thank you!

Andrew

Re: Question regarding JSON Template timestamp rendering

2021-11-01 Thread Volkan Yazıcı
Thanks so much for confirming the fix and more importantly, sparing time to
share the issue with us. 2.15.0 is supposed to be released soon. We are
waiting for some changes from another maintainer (I am looking at you
Ralph) and then we will be done.

What I would really appreciate is some details about your use case. How do
you purpose JTL? What do you use for the log storage engine? ELK? Which
appender (pipeline?) do you use to make your way from the application to
your long sink? What is the scale? Do you have any Log4j/JTL customizations?

And... Thanks for your kind words. Flu has shackled me to bed for a couple
of days, but I am feeling better now.

On Thu, Oct 28, 2021 at 8:28 PM Andrew Harris (andharr2) <
andrew.har...@appdynamics.com> wrote:

> Volkan,
>
> I am happy to report that the change in
> 2dd7063fb6c6fe73070aded6607a2e2d53613b46 appears to have resolved the
> issue! After building and installing a local snapshot of
> log4j-layout-template-json from release-2.x, I now see the following in my
> test application:
>
> ```
> {"timestamp.epoch":1635443515353213000,"timestamp.iso8601":"2021-10-28T17:51:55.353Z","severityText":"INFO","body":"Starting
> count"}
> {"timestamp.epoch":1635443515360647000,"timestamp.iso8601":"2021-10-28T17:51:55.360Z","severityText":"INFO","body":"Event
> 0"}
> {"timestamp.epoch":1635443516365136000,"timestamp.iso8601":"2021-10-28T17:51:56.365Z","severityText":"INFO","body":"Event
> 1"}
> {"timestamp.epoch":1635443517365604000,"timestamp.iso8601":"2021-10-28T17:51:57.365Z","severityText":"INFO","body":"Event
> 2"}
> ```
>
> After several more runs, including runs over SLF4J, the epoch timestamp
> resolver operates as expected. I am also happy to report that a pattern
> layout also continues to operate as expected.
>
> Speaking to the test added in 2dd7063f, I ran exactly that test against
> the previous head b6774209, and indeed the test fails. Also a good sign,
> the test seems to cover the logging behavior! Seen as follows:
>
> ```
> [ERROR] Failures:
> [ERROR]
>  
> TimestampResolverTest.epoch_nanos_should_not_overlap:43->lambda$epoch_nanos_should_not_overlap$1:69
> Found duplicate(s):
>   [1635444597296722000L]
> in:
>   [1635444597296722000L,
> 1635444597296722000L,
> 1635444597296722000L,
> 1635444597296722000L,
> 1635444597296722000L]
> ```
>
> Meanwhile, of course, the test passes in 2dd7063f.
>
> Thank you for your help here. I am sorry that I wasn't able to isolate the
> issue more quickly, let alone provide a test case myself. Looking forward
> to this change arriving in a future release. Hope you are feeling better,
> too!
>
> Andrew
>


Re: Question regarding JSON Template timestamp rendering

2021-10-28 Thread Andrew Harris (andharr2)
Volkan,

I am happy to report that the change in 
2dd7063fb6c6fe73070aded6607a2e2d53613b46 appears to have resolved the issue! 
After building and installing a local snapshot of log4j-layout-template-json 
from release-2.x, I now see the following in my test application:

```
{"timestamp.epoch":1635443515353213000,"timestamp.iso8601":"2021-10-28T17:51:55.353Z","severityText":"INFO","body":"Starting
 count"}
{"timestamp.epoch":1635443515360647000,"timestamp.iso8601":"2021-10-28T17:51:55.360Z","severityText":"INFO","body":"Event
 0"}
{"timestamp.epoch":1635443516365136000,"timestamp.iso8601":"2021-10-28T17:51:56.365Z","severityText":"INFO","body":"Event
 1"}
{"timestamp.epoch":1635443517365604000,"timestamp.iso8601":"2021-10-28T17:51:57.365Z","severityText":"INFO","body":"Event
 2"}
```

After several more runs, including runs over SLF4J, the epoch timestamp 
resolver operates as expected. I am also happy to report that a pattern layout 
also continues to operate as expected.

Speaking to the test added in 2dd7063f, I ran exactly that test against the 
previous head b6774209, and indeed the test fails. Also a good sign, the test 
seems to cover the logging behavior! Seen as follows:

```
[ERROR] Failures:
[ERROR]   
TimestampResolverTest.epoch_nanos_should_not_overlap:43->lambda$epoch_nanos_should_not_overlap$1:69
Found duplicate(s):
  [1635444597296722000L]
in:
  [1635444597296722000L,
1635444597296722000L,
1635444597296722000L,
1635444597296722000L,
1635444597296722000L]
```

Meanwhile, of course, the test passes in 2dd7063f.

Thank you for your help here. I am sorry that I wasn't able to isolate the 
issue more quickly, let alone provide a test case myself. Looking forward to 
this change arriving in a future release. Hope you are feeling better, too!

Andrew


Re: Question regarding JSON Template timestamp rendering

2021-10-28 Thread Volkan Yazıcı
Andrew, I have pushed a fix to the `release-2.x` branch with commit
`2dd7063fb6c6fe73070aded6607a2e2d53613b46`.
Mind giving it a try, please?

For the records, created LOG4J2-3183
.

On Thu, Oct 28, 2021 at 11:02 AM Volkan Yazıcı  wrote:

> I sadly am able to reproduce the issue Andrew:
>
> public final class TimeDriftDemo {
>
> public static void main(String[] args) throws InterruptedException {
> initLog4j();
> Logger logger = LogManager.getLogger();
> for (int i = 0; i < 5; i++) {
> logger.info("{}", i);
> Thread.sleep(100);
> }
> }
>
> private static LoggerContext initLog4j() {
>
> // Create the configuration builder.
> ConfigurationBuilder configBuilder = 
> ConfigurationBuilderFactory
> .newConfigurationBuilder()
> .setStatusLevel(Level.ERROR)
> .setConfigurationName(TimeDriftDemo.class.getSimpleName());
>
> // Create the configuration.
> String appenderName = "Console";
> String eventTemplate = "" +
> 
> "[{\"$resolver\":\"timestamp\",\"epoch\":{\"unit\":\"nanos\"}}" +
> 
> ",{\"$resolver\":\"timestamp\",\"pattern\":{\"format\":\"ss.SSS'Z'\",\"timeZone\":\"UTC\",\"locale\":\"en_US\"}}"
>  +
> "]";
> Configuration config = configBuilder
> .add(configBuilder
> .newAppender(appenderName, "Console")
> .add(configBuilder
> .newLayout("JsonTemplateLayout")
> .addAttribute(
> "eventTemplate",
> eventTemplate)))
> .add(configBuilder.newLogger("com.vlkan", Level.TRACE))
> .add(configBuilder
> .newRootLogger(Level.ERROR)
> .add(configBuilder.newAppenderRef(appenderName)))
> .build(false);
>
> // Initialize the configuration.
> return Configurator.initialize(config);
>
> }
>
> }
>
> I will create a ticket and act on it.
> Thanks so much for the report!
>
>
> On Thu, Oct 28, 2021 at 3:19 AM Andrew Harris (andharr2) <
> andrew.har...@appdynamics.com> wrote:
>
>> Volkan,
>>
>> I was able to get the test case you supplied running in
>> JsonTemplateLayoutTest. I confirm that it passes on my system as well. In
>> fact, all the tests in `log4j-layout-template-json` at `rel/2.14.1` pass
>> (except JsonTemplateLayoutGcFreeTest, which I'm willing to believe is a
>> quirk of that test vis-a-vis my setup). That tells me that log rendering in
>> unit-test isolation operates as expected.
>>
>> I extended the test case to use SystemClock to generate two Instants with
>> a short pause between generation, like:
>> ```
>> final Clock systemClock = new SystemClock();
>> final MutableInstant instant3 = new MutableInstant();
>> instant3.initFrom(systemClock);
>> try { Thread.sleep(100); } catch (InterruptedException e) {};
>> final MutableInstant instant4 = new MutableInstant();
>> instant4.initFrom(systemClock);
>>
>> final LogEvent logEvent3 =
>> Log4jLogEvent.newBuilder().setInstant(instant3).build();
>> final LogEvent logEvent4 =
>> Log4jLogEvent.newBuilder().setInstant(instant4).build();
>>
>> usingSerializedLogEventAccessor(layout, logEvent3, accessor3 -> {
>> usingSerializedLogEventAccessor(layout, logEvent4, accessor4
>> -> {
>> Long epoch3 = accessor3.getObject("timestamp.epoch",
>> Long.class);
>> String iso3 = accessor3.getString("timestamp.iso8601");
>>
>> Long epoch4 = accessor4.getObject("timestamp.epoch",
>> Long.class);
>> String iso4 = accessor4.getString("timestamp.iso8601");
>>
>> assertThat(epoch4 - epoch3).isGreaterThanOrEqualTo(100L);
>> assertThat(iso3).isNotEqualTo(iso4);
>> });
>> });
>> ```
>>
>> This test portion also passed. This tells me that the act of deriving the
>> time from a provided clock operates as expected.
>>
>> Back in my example application, I did some more experimentation and found
>> the following:
>>
>> - Removing the timestamp pattern resolver from the JSON template does not
>> change behavior. Epoch timestamps continue to be repeated.
>> - Changing the timestamp epoch resolver to use millis or seconds does not
>> change behavior. Epoch timestamps are correctly rounded and rendered, they
>> just don't appear to advance.
>>
>> Seeking to rule out whether this was due to behavior in the logger, I
>> switched to an async logger using Disruptor 3.4.4:
>> - Passing
>> '-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector'
>> does not appear to change behavior.
>> - Using an 

Re: Question regarding JSON Template timestamp rendering

2021-10-28 Thread Volkan Yazıcı
I sadly am able to reproduce the issue Andrew:

public final class TimeDriftDemo {

public static void main(String[] args) throws InterruptedException {
initLog4j();
Logger logger = LogManager.getLogger();
for (int i = 0; i < 5; i++) {
logger.info("{}", i);
Thread.sleep(100);
}
}

private static LoggerContext initLog4j() {

// Create the configuration builder.
ConfigurationBuilder configBuilder =
ConfigurationBuilderFactory
.newConfigurationBuilder()
.setStatusLevel(Level.ERROR)
.setConfigurationName(TimeDriftDemo.class.getSimpleName());

// Create the configuration.
String appenderName = "Console";
String eventTemplate = "" +

"[{\"$resolver\":\"timestamp\",\"epoch\":{\"unit\":\"nanos\"}}" +

",{\"$resolver\":\"timestamp\",\"pattern\":{\"format\":\"ss.SSS'Z'\",\"timeZone\":\"UTC\",\"locale\":\"en_US\"}}"
+
"]";
Configuration config = configBuilder
.add(configBuilder
.newAppender(appenderName, "Console")
.add(configBuilder
.newLayout("JsonTemplateLayout")
.addAttribute(
"eventTemplate",
eventTemplate)))
.add(configBuilder.newLogger("com.vlkan", Level.TRACE))
.add(configBuilder
.newRootLogger(Level.ERROR)
.add(configBuilder.newAppenderRef(appenderName)))
.build(false);

// Initialize the configuration.
return Configurator.initialize(config);

}

}

I will create a ticket and act on it.
Thanks so much for the report!


On Thu, Oct 28, 2021 at 3:19 AM Andrew Harris (andharr2) <
andrew.har...@appdynamics.com> wrote:

> Volkan,
>
> I was able to get the test case you supplied running in
> JsonTemplateLayoutTest. I confirm that it passes on my system as well. In
> fact, all the tests in `log4j-layout-template-json` at `rel/2.14.1` pass
> (except JsonTemplateLayoutGcFreeTest, which I'm willing to believe is a
> quirk of that test vis-a-vis my setup). That tells me that log rendering in
> unit-test isolation operates as expected.
>
> I extended the test case to use SystemClock to generate two Instants with
> a short pause between generation, like:
> ```
> final Clock systemClock = new SystemClock();
> final MutableInstant instant3 = new MutableInstant();
> instant3.initFrom(systemClock);
> try { Thread.sleep(100); } catch (InterruptedException e) {};
> final MutableInstant instant4 = new MutableInstant();
> instant4.initFrom(systemClock);
>
> final LogEvent logEvent3 =
> Log4jLogEvent.newBuilder().setInstant(instant3).build();
> final LogEvent logEvent4 =
> Log4jLogEvent.newBuilder().setInstant(instant4).build();
>
> usingSerializedLogEventAccessor(layout, logEvent3, accessor3 -> {
> usingSerializedLogEventAccessor(layout, logEvent4, accessor4
> -> {
> Long epoch3 = accessor3.getObject("timestamp.epoch",
> Long.class);
> String iso3 = accessor3.getString("timestamp.iso8601");
>
> Long epoch4 = accessor4.getObject("timestamp.epoch",
> Long.class);
> String iso4 = accessor4.getString("timestamp.iso8601");
>
> assertThat(epoch4 - epoch3).isGreaterThanOrEqualTo(100L);
> assertThat(iso3).isNotEqualTo(iso4);
> });
> });
> ```
>
> This test portion also passed. This tells me that the act of deriving the
> time from a provided clock operates as expected.
>
> Back in my example application, I did some more experimentation and found
> the following:
>
> - Removing the timestamp pattern resolver from the JSON template does not
> change behavior. Epoch timestamps continue to be repeated.
> - Changing the timestamp epoch resolver to use millis or seconds does not
> change behavior. Epoch timestamps are correctly rounded and rendered, they
> just don't appear to advance.
>
> Seeking to rule out whether this was due to behavior in the logger, I
> switched to an async logger using Disruptor 3.4.4:
> - Passing
> '-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector'
> does not appear to change behavior.
> - Using an AsyncLogger does not appear to change behavior.
> - Changing `log4j2.clock` to use CachedClock (vs SystemClock) does not
> change behavior. Some precision in the nano timestamp is lost, as I believe
> is expected.
>
> I sought to rule out JDK differences, so I ran my bench application
> against Azul Zulu 8, 11, and 16, as well as AdoptOpenJDK 11 on J9. No
> change in behavior between these, the epoch was still repeated between runs.
>
> Using a PatternLayout allows both Unix epoch and 

Re: Question regarding JSON Template timestamp rendering

2021-10-27 Thread Andrew Harris (andharr2)
Volkan,

I was able to get the test case you supplied running in JsonTemplateLayoutTest. 
I confirm that it passes on my system as well. In fact, all the tests in 
`log4j-layout-template-json` at `rel/2.14.1` pass (except 
JsonTemplateLayoutGcFreeTest, which I'm willing to believe is a quirk of that 
test vis-a-vis my setup). That tells me that log rendering in unit-test 
isolation operates as expected.

I extended the test case to use SystemClock to generate two Instants with a 
short pause between generation, like:
```
final Clock systemClock = new SystemClock();
final MutableInstant instant3 = new MutableInstant();
instant3.initFrom(systemClock);
try { Thread.sleep(100); } catch (InterruptedException e) {};
final MutableInstant instant4 = new MutableInstant();
instant4.initFrom(systemClock);

final LogEvent logEvent3 = 
Log4jLogEvent.newBuilder().setInstant(instant3).build();
final LogEvent logEvent4 = 
Log4jLogEvent.newBuilder().setInstant(instant4).build();

usingSerializedLogEventAccessor(layout, logEvent3, accessor3 -> {
usingSerializedLogEventAccessor(layout, logEvent4, accessor4 -> {
Long epoch3 = accessor3.getObject("timestamp.epoch", 
Long.class);
String iso3 = accessor3.getString("timestamp.iso8601");

Long epoch4 = accessor4.getObject("timestamp.epoch", 
Long.class);
String iso4 = accessor4.getString("timestamp.iso8601");

assertThat(epoch4 - epoch3).isGreaterThanOrEqualTo(100L);
assertThat(iso3).isNotEqualTo(iso4);
});
});
```

This test portion also passed. This tells me that the act of deriving the time 
from a provided clock operates as expected.

Back in my example application, I did some more experimentation and found the 
following:

- Removing the timestamp pattern resolver from the JSON template does not 
change behavior. Epoch timestamps continue to be repeated.
- Changing the timestamp epoch resolver to use millis or seconds does not 
change behavior. Epoch timestamps are correctly rounded and rendered, they just 
don't appear to advance.

Seeking to rule out whether this was due to behavior in the logger, I switched 
to an async logger using Disruptor 3.4.4:
- Passing 
'-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector'
 does not appear to change behavior.
- Using an AsyncLogger does not appear to change behavior.
- Changing `log4j2.clock` to use CachedClock (vs SystemClock) does not change 
behavior. Some precision in the nano timestamp is lost, as I believe is 
expected.

I sought to rule out JDK differences, so I ran my bench application against 
Azul Zulu 8, 11, and 16, as well as AdoptOpenJDK 11 on J9. No change in 
behavior between these, the epoch was still repeated between runs.

Using a PatternLayout allows both Unix epoch and pattern-derived timestamps to 
be rendered as expected:
```

```

"""
2021-10-27 18:07:28.111 - example.Log4jApp - Starting count 
timestamp=1635383248111
2021-10-27 18:07:28.118 - example.Log4jApp - Event 0 timestamp=1635383248118
2021-10-27 18:07:29.123 - example.Log4jApp - Event 1 timestamp=1635383249123
"""

I confirmed the behavior of the PatternLayout with an AsyncLogger as well, and 
it too worked as expected.

Please let me know what might be worth trying next here, and thank you for your 
ideas up to now. I'm quite confused at this point. :)

Andrew


Re: Question regarding JSON Template timestamp rendering

2021-10-26 Thread Andrew Harris (andharr2)
Volkan,

I must be making a mistake somewhere. As a check on basic assumptions, I sought 
to craft a simple Java application that emits logs via a Logger, using a 
logging configuration like in my first message. I found that the 
pattern-formatted timestamp resolver operates as expected, whereas the epoch 
resolver gets "stuck" after the first emitted timestamp.

This test application is running outside of Docker. My machine is running MacOS 
11.6, and the test application is configured to use Azul JDK 11.0.12.

Log lines appear like:
```
{"timestamp.epoch":1635297200141169000,"timestamp.iso8601":"2021-10-27T01:13:20.141Z","severityText":"INFO","body":"Starting
 count"}
{"timestamp.epoch":1635297200141169000,"timestamp.iso8601":"2021-10-27T01:13:20.148Z","severityText":"INFO","body":"Event
 0"}
{"timestamp.epoch":1635297200141169000,"timestamp.iso8601":"2021-10-27T01:13:21.151Z","severityText":"INFO","body":"Event
 1"}
...
```
Notice that the epoch and ISO timestamp align correctly in the first log line 
and diverge thereafter. The epoch timestamp never advances, in several rounds 
of tests and after toggling from epoch nanos to rounded epoch seconds in the 
template.

The test application:
```
public class Log4jApp {
public static final Logger LOGGER = LogManager.getLogger(Log4jApp.class);

public static void main(String[] args) {
LOGGER.info("Starting count");
IntStream.range(0, 100).forEach(i -> {
LOGGER.info("Event {}", i);
try { Thread.sleep(1000); } catch (InterruptedException e) {};
});
LOGGER.info("End count");
}
}
```
I found also that a test application written using SLF4J's logger exhibits the 
same behavior. The SLF4J implementation I tested swaps the LOGGER construction 
for SLF4J objects and is otherwise equivalent.

The logging configuration:
```
?xml version="1.0" encoding="UTF-8"?>












```

The template:
```
{
  "timestamp.epoch": {
"$resolver": "timestamp",
"epoch": {
  "unit": "nanos"
}
  },
  "timestamp.iso8601": {
"$resolver": "timestamp",
"pattern": {
  "format": "-MM-dd'T'HH:mm:ss.SSS'Z'",
  "timeZone": "UTC",
  "locale": "en_US"
}
  },
  "severityText": {
"$resolver": "level",
"field": "name"
  },
  "body": {
"$resolver": "message",
"stringified": true
  }
}
```

The Gradle dependencies driving the app:
```
dependencies {
annotationProcessor platform('org.apache.logging.log4j:log4j-bom:2.14.1')
annotationProcessor 'org.apache.logging.log4j:log4j-core'

implementation 'org.slf4j:slf4j-api:1.7.32'
implementation platform('org.apache.logging.log4j:log4j-bom:2.14.1')
implementation 'org.apache.logging.log4j:log4j-api'
implementation 'org.apache.logging.log4j:log4j-core'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
runtimeOnly 'org.apache.logging.log4j:log4j-layout-template-json'

testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2'
}
```
No web frameworks, no concurrency extensions. Just logging.

I'll seek to create a repeatable test case tomorrow for this behavior. Happy to 
package this work if you'd like to run it on your end.

Thoughts here? Thank you again, and hope you've recovered.

Andrew


Re: Question regarding JSON Template timestamp rendering

2021-10-25 Thread Andrew Harris (andharr2)
Volkan,

Thank you for the reply, and for the insight regarding the caching action of 
rendered timestamps. That would seem like a great place for me to try to 
investigate further.

You asked about the environment in which I spotted these drifts. The 
application in which I am using Log4J is a Micronaut-based API service 
(https://micronaut.io/). The log output I offered in my first message was, I 
believe, just vanilla console logging through Log4J while running the 
application in a Docker harness. Debug-level logging was enabled, however I 
wasn't deliberately introducing load on the application, just making some 
simple API calls.

I'll see what I can do about reproducing the behavior in a test case, or in 
some other generic format. Feel better soon!

Andrew

From: Volkan Yazıcı 
Sent: Monday, October 25, 2021 12:55 PM
To: Log4J Users List 
Subject: Re: Question regarding JSON Template timestamp rendering

Hey Andrew,

Thanks so much for reaching out. I have tried to reproduce your issue via
unit tests, but had no luck so far:

@Test
void test_conflicting_timestamps() {

// Create the event template.
final String eventTemplate = writeJson(asMap(
"timestamp.epoch", asMap(
"$resolver", "timestamp",
"epoch", asMap("unit", "nanos")),
"timestamp.iso8601", asMap(
"$resolver", "timestamp",
"pattern", asMap(
"format", "-MM-dd'T'HH:mm:ss.SSS'Z'",
"timeZone", "UTC",
"locale", "en_US";

// Create the layout.
final JsonTemplateLayout layout = JsonTemplateLayout
.newBuilder()
.setConfiguration(CONFIGURATION)
.setEventTemplate(eventTemplate)
.build();

// Create the log event #1.
final MutableInstant instant1 = new MutableInstant();
instant1.initFromEpochSecond(1_634_943_424L, 218_000_000);
final LogEvent logEvent1 = Log4jLogEvent
.newBuilder()
.setInstant(instant1)
.build();

// Check the serialized event #1.
usingSerializedLogEventAccessor(layout, logEvent1, accessor -> {
assertThat(accessor.getObject("timestamp.epoch",
Long.class)).isEqualTo(1_634_943_424_218_000_000L);

assertThat(accessor.getString("timestamp.iso8601")).isEqualTo("2021-10-22T22:57:04.218Z");
});

// Create the log event #2.
final MutableInstant instant2 = new MutableInstant();
instant2.initFromEpochSecond(1_634_943_425L, 622_000_000);
final LogEvent logEvent2 = Log4jLogEvent
.newBuilder()
.setInstant(instant2)
.build();

// Check the serialized event #2.
usingSerializedLogEventAccessor(layout, logEvent2, accessor -> {
assertThat(accessor.getObject("timestamp.epoch",
Long.class)).isEqualTo(1_634_943_425_622_000_000L);

assertThat(accessor.getString("timestamp.iso8601")).isEqualTo("2021-10-22T22:57:05.622Z");
});

}

This was a snippet I chucked into `JsonTemplateLayoutTest`. Note that above
timestamp values are copied from the last two examples you shared.

Your examples indicate that epoch nanos resolutions occasionally contain
drifts, whereas formatted timestamps look okay. Both resolvers cache the
last resolution output and either use it (cache hit) or replace it (cache
miss). (See `TimestampResolver` for details.) Epoch resolvers use
`Instant#equals()` to raise a cache hit, formatting resolvers use
`calendar.getTimeInMillis() == logEvent.getTimeMillis()` instead – since
`FastDateFormat` works against `Calendar`s. Both interact with the shared
cache object (referenced by a `private final` member) in a `synchronized
resolve()` method body.

Maybe it is the late hour or the flu I have, I am not able to find a
smoking gun. How occasionally do you encounter these epoch drifts? At least
once a day? Is this a heavily threaded application where contention might
happen relatively a lot at the timestamp resolver's synchronized block? I
have checked 2.15.0-SNAPSHOT sources, they don't contain any changes to the
epoch nanos resolution, hence I don't expect any changes there.

How/Where did you spot these drifts? Do you read the JTL output from the
console? (I am trying to make sure it is not a number rounding problem –
yes Javascript, I am looking at you – while transmitting logs from the
application to your log sink.)

What I will really appreciate is a JUnit test reproducing the issue. Maybe
modifying the snippet I have shared above and shooting at it with some
threads?

Kind regards.

On Mon, Oct 25, 2021 at 8:20 PM Andrew Harris (andharr2) <
andrew.har...@appdynamics.com> wro

Re: Question regarding JSON Template timestamp rendering

2021-10-25 Thread Volkan Yazıcı
Hey Andrew,

Thanks so much for reaching out. I have tried to reproduce your issue via
unit tests, but had no luck so far:

@Test
void test_conflicting_timestamps() {

// Create the event template.
final String eventTemplate = writeJson(asMap(
"timestamp.epoch", asMap(
"$resolver", "timestamp",
"epoch", asMap("unit", "nanos")),
"timestamp.iso8601", asMap(
"$resolver", "timestamp",
"pattern", asMap(
"format", "-MM-dd'T'HH:mm:ss.SSS'Z'",
"timeZone", "UTC",
"locale", "en_US";

// Create the layout.
final JsonTemplateLayout layout = JsonTemplateLayout
.newBuilder()
.setConfiguration(CONFIGURATION)
.setEventTemplate(eventTemplate)
.build();

// Create the log event #1.
final MutableInstant instant1 = new MutableInstant();
instant1.initFromEpochSecond(1_634_943_424L, 218_000_000);
final LogEvent logEvent1 = Log4jLogEvent
.newBuilder()
.setInstant(instant1)
.build();

// Check the serialized event #1.
usingSerializedLogEventAccessor(layout, logEvent1, accessor -> {
assertThat(accessor.getObject("timestamp.epoch",
Long.class)).isEqualTo(1_634_943_424_218_000_000L);

assertThat(accessor.getString("timestamp.iso8601")).isEqualTo("2021-10-22T22:57:04.218Z");
});

// Create the log event #2.
final MutableInstant instant2 = new MutableInstant();
instant2.initFromEpochSecond(1_634_943_425L, 622_000_000);
final LogEvent logEvent2 = Log4jLogEvent
.newBuilder()
.setInstant(instant2)
.build();

// Check the serialized event #2.
usingSerializedLogEventAccessor(layout, logEvent2, accessor -> {
assertThat(accessor.getObject("timestamp.epoch",
Long.class)).isEqualTo(1_634_943_425_622_000_000L);

assertThat(accessor.getString("timestamp.iso8601")).isEqualTo("2021-10-22T22:57:05.622Z");
});

}

This was a snippet I chucked into `JsonTemplateLayoutTest`. Note that above
timestamp values are copied from the last two examples you shared.

Your examples indicate that epoch nanos resolutions occasionally contain
drifts, whereas formatted timestamps look okay. Both resolvers cache the
last resolution output and either use it (cache hit) or replace it (cache
miss). (See `TimestampResolver` for details.) Epoch resolvers use
`Instant#equals()` to raise a cache hit, formatting resolvers use
`calendar.getTimeInMillis() == logEvent.getTimeMillis()` instead – since
`FastDateFormat` works against `Calendar`s. Both interact with the shared
cache object (referenced by a `private final` member) in a `synchronized
resolve()` method body.

Maybe it is the late hour or the flu I have, I am not able to find a
smoking gun. How occasionally do you encounter these epoch drifts? At least
once a day? Is this a heavily threaded application where contention might
happen relatively a lot at the timestamp resolver's synchronized block? I
have checked 2.15.0-SNAPSHOT sources, they don't contain any changes to the
epoch nanos resolution, hence I don't expect any changes there.

How/Where did you spot these drifts? Do you read the JTL output from the
console? (I am trying to make sure it is not a number rounding problem –
yes Javascript, I am looking at you – while transmitting logs from the
application to your log sink.)

What I will really appreciate is a JUnit test reproducing the issue. Maybe
modifying the snippet I have shared above and shooting at it with some
threads?

Kind regards.

On Mon, Oct 25, 2021 at 8:20 PM Andrew Harris (andharr2) <
andrew.har...@appdynamics.com> wrote:

> Hi friends,
>
> I have a JSON Template layout in a project I maintain, and I have noticed
> a behavior in how timestamps are rendered that I did not expect. I went
> through the JSON Template resolver source for a few minutes last week and
> did not find an explanation, nor did I find any open issues or related
> messages on this list. I would greatly appreciate your help!
>
> I am using Log4J 2.14.1 in a Java 11 project, and the following log lines
> were generated via a Docker-based test environment. I have a JSON Template
> configuration like:
>
> ```
> {
>   "timestamp": {
> "$resolver": "timestamp",
> "epoch": {
>   "unit": "nanos"
> }
>   },
>   "timestamp.iso8601": {
> "$resolver": "timestamp",
> "pattern": {
>   "format": "-MM-dd'T'HH:mm:ss.SSS'Z'",
>   "timeZone": "UTC",
>   "locale": "en_US"
> }
>   },
>   ...
> }
> ```
>
> My log4j2.xml is fairly unremarkable, I think, like:
>
> ```
> 
> 
> 
>  eventTemplateUri="classpath:myJsonTemplateLayout.json"/>
> 
> 
> 
>  additivity="false">
> 
> 
> ...
> 
> 
> 
> 

Re: Question on accessing the threadcontext in pattern vs lookup

2021-04-11 Thread Lars-Fredrik Smedberg
Hi

Thanks all for the answers.

I actually did some debugging and changed to the thread context data on the
log event around the time for the first reply (when i saw that the log
event was constructed before passing it to the async logger). The reason
for using the lookup and not only %X is that is does more than just pass
the value through (at least for some keys). The lookup also provides values
not based upon the thread context so it's also for consistency reasons
towards the internal users/developers.

Preciate everyone's time, thanks
Best regards
LF

On Sat, Apr 10, 2021, 22:24 Ralph Goers  wrote:

> Your assumption is correct, but there is a way to avoid the problem. The
> issue is that, as one might expect, the ThreadContext is thread specific.
> So when the pattern is resolved it will be on the thread where the event is
> to be written, not the thread that called the logging method.
>
> You can avoid this problem by not using the ThreadContext directly.
> Instead, get the context data out of the LogEvent. It will contain the
> ThreadContext data at the time the LogEvent was created. However, that
> would give you exactly the same thing %X does, so what is the point?
>
> Ralph
>
> > On Apr 9, 2021, at 9:00 AM, Lars-Fredrik Smedberg 
> wrote:
> >
> > Hi!
> >
> > We are using different appenders with a pattern layout that both read
> > values from ThreadContext using %X and through a custom lookup that
> > internally access the ThreadContext
> >
> > If we use a pattern such as "%X{testkey} $${m:testkey} %m" (the lookup
> > assigned to prefix m access the same key from the ThreadContext) and then
> > use our appender in an AsyncLogger then we get the correct value for the
> > %X{testkey} but not for $${m:testkey}.
> >
> > I assume the message is formatted on the caller thread but that the
> lookup
> > part of the pattern is resolved on the async thread since it does not
> seem
> > to find the key in the ThreadContext inside our lookup class?
> >
> > Is the above the root cause to our problem? Is there a way around this?
> We
> > really would like to use our custom lookup that use ThreadContext with
> > async loggers.
> >
> > Any help would be greatly apreciated
> > Best regards
> > LF
> >
> > --
> > Med vänlig hälsning / Best regards
> >
> > Lars-Fredrik Smedberg
> >
> > STATEMENT OF CONFIDENTIALITY:
> > The information contained in this electronic message and any
> > attachments to this message are intended for the exclusive use of the
> > address(es) and may contain confidential or privileged information. If
> > you are not the intended recipient, please notify Lars-Fredrik Smedberg
> > immediately at itsme...@gmail.com, and destroy all copies of this
> > message and any attachments.
>
>
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


Re: Question on accessing the threadcontext in pattern vs lookup

2021-04-10 Thread Ralph Goers
Your assumption is correct, but there is a way to avoid the problem. The issue 
is that, as one might expect, the ThreadContext is thread specific. So when the 
pattern is resolved it will be on the thread where the event is to be written, 
not the thread that called the logging method.

You can avoid this problem by not using the ThreadContext directly. Instead, 
get the context data out of the LogEvent. It will contain the ThreadContext 
data at the time the LogEvent was created. However, that would give you exactly 
the same thing %X does, so what is the point?

Ralph

> On Apr 9, 2021, at 9:00 AM, Lars-Fredrik Smedberg  wrote:
> 
> Hi!
> 
> We are using different appenders with a pattern layout that both read
> values from ThreadContext using %X and through a custom lookup that
> internally access the ThreadContext
> 
> If we use a pattern such as "%X{testkey} $${m:testkey} %m" (the lookup
> assigned to prefix m access the same key from the ThreadContext) and then
> use our appender in an AsyncLogger then we get the correct value for the
> %X{testkey} but not for $${m:testkey}.
> 
> I assume the message is formatted on the caller thread but that the lookup
> part of the pattern is resolved on the async thread since it does not seem
> to find the key in the ThreadContext inside our lookup class?
> 
> Is the above the root cause to our problem? Is there a way around this? We
> really would like to use our custom lookup that use ThreadContext with
> async loggers.
> 
> Any help would be greatly apreciated
> Best regards
> LF
> 
> -- 
> Med vänlig hälsning / Best regards
> 
> Lars-Fredrik Smedberg
> 
> STATEMENT OF CONFIDENTIALITY:
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> address(es) and may contain confidential or privileged information. If
> you are not the intended recipient, please notify Lars-Fredrik Smedberg
> immediately at itsme...@gmail.com, and destroy all copies of this
> message and any attachments.



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question on accessing the threadcontext in pattern vs lookup

2021-04-10 Thread Volkan Yazıcı
AFAIC, your reasoning on why m:testkey not working is correct. Why don't
you create your own PatternConverter rather than using a custom lookup?

Additionally, if your log sink accepts JSON, you can introduce a custom
resolver to JsonTemplateLayout too -- though note that this feature will be
available with the upcoming 2.5.0 release.

On Fri, 9 Apr 2021, 18:01 Lars-Fredrik Smedberg  wrote:

> Hi!
>
> We are using different appenders with a pattern layout that both read
> values from ThreadContext using %X and through a custom lookup that
> internally access the ThreadContext
>
> If we use a pattern such as "%X{testkey} $${m:testkey} %m" (the lookup
> assigned to prefix m access the same key from the ThreadContext) and then
> use our appender in an AsyncLogger then we get the correct value for the
> %X{testkey} but not for $${m:testkey}.
>
> I assume the message is formatted on the caller thread but that the lookup
> part of the pattern is resolved on the async thread since it does not seem
> to find the key in the ThreadContext inside our lookup class?
>
> Is the above the root cause to our problem? Is there a way around this? We
> really would like to use our custom lookup that use ThreadContext with
> async loggers.
>
> Any help would be greatly apreciated
> Best regards
> LF
>
> --
> Med vänlig hälsning / Best regards
>
> Lars-Fredrik Smedberg
>
> STATEMENT OF CONFIDENTIALITY:
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> address(es) and may contain confidential or privileged information. If
> you are not the intended recipient, please notify Lars-Fredrik Smedberg
> immediately at itsme...@gmail.com, and destroy all copies of this
> message and any attachments.
>


Re: Question about several Async Loggers + RandomAccessFIle appenders with immediateFlush = false

2016-06-20 Thread Anthony Maire
I succeed to reproduce the issue I was suspecting to happen :
https://issues.apache.org/jira/browse/LOG4J2-1441


2016-06-17 15:11 GMT+02:00 Anthony Maire :

> Hello
>
> As suggested in AsyncLogger javadoc, I made some performance tests on my
> application with (Rolling)RandomAccessFile appenders configured with
> immediateFlush = false to take advantage of the potential I/O batching, and
> the results are very good :)
>
> However I have a question about the flush on end of batch mechanism when
> there are several appenders to flush.
>
> *Case one:*
>
> - AsyncLogger L1 has very few messages to log (let's say its a logger
> which logs only when a request fails) and has its dedicated RAF appender A1.
> - AsyncLogger L2 is very active (let's say its a logger which logs every
> request that enters the system), and has its dedicated RAF appender A2
>
> As far as I understand the code, both loggers use the same disruptor
> instance. Let's assume that at some time, an event E1 is submitted to the
> disruptor by L1, but the background thread doesn't wake up immediately and
> another event E2 is submitted by L2, so both events will be part of the
> same batch when the background thread wakes up
>
> I'm afraid that the following will happen :
> - A1 encode E1 in its buffer, but does not write to the RAF since
> event.isEndOfBatch() == false
> - Background thread now process E2, it will be encoded in A2 buffer, and
> since E2 is a end of batch event, A2 is flushed
> However A1 is not flushed and will never be until another event is logged
> to it.
>
> *Case Two:*
>
> Same kind of idea with a single AsyncLogger or AsyncAppender, 2 RAF
> appender referenced on it, one of them as a filter (or a level that is
> higher than the source level). If the end of batch event is filtered out
> for an appender, is there a mecanism that will make flush earlier events
> that were ine the same batch ?
>
> I try to find something in the code that will prevent this issue to
> happen, but I didn't succeed to find one. Since reproducing these cases is
> not trivial to test , I would like to have the analysis of someone who
> knows the code better than I do :)
>
> Regards,
> Anthony
>
>
>
>
>
>


Re: Question about how to create new log files on an hourly not depend on new byte stream log appended

2016-06-19 Thread Remko Popma
Allen,

Please take a look at the CronTriggeringPolicy.

Remko

On Mon, Jun 20, 2016 at 12:09 AM, 流子℡ <41157...@qq.com> wrote:

> hi,
> here is my log config as follows:
>
>
>   fileName="game"
>  filePattern="game.%d{-MM-dd-HH}.log">
>
>modulate="true" />  
>  
>
> As we know,for instance,now is 22:55 pm,the active file  named 'game' is
> printed continuously,
> at 23:00 pm ,the first byte stream out will trigger the file named 'game'
> rename to game.2016-06-19-22.log,and print the byte stream to the new
> file named 'game'. if no other byte stream in  the next one hour, the
> behavior will not be triggered.
> it will lead to that the log will be batch inserted into mysql db delay if
> we only pick up the file having suffix '.log'.
> because the content still remain in file  named 'game' not be suffix
> '.log'.
>
>
> my question is  how to create new log files on an hourly not depend on new
> byte stream log appended.
>
>
> yours
> Allen


Re: Question about async logger wait strategies

2016-06-14 Thread Anthony Maire
If the sources have not been moved, it's still considered as experimental
on master (and it was still experimental on 3.3.5-rc2 tag)
https://github.com/LMAX-Exchange/disruptor/blob/master/src/main/java/com/lmax/disruptor/LiteBlockingWaitStrategy.java




2016-06-14 7:15 GMT+02:00 Gary Gregory :

> On Mon, Jun 13, 2016 at 9:51 PM, Anthony Maire 
> wrote:
>
> > Basically you want a logging framework to have as little impact as
> possible
> > on the application. That's why the sleeping strategy is a good
> > general-purpose choice : no allocation, no lock for the application
> > threads, and a CPU consumption when "idle" that will stay pretty low on
> > most OS (it roughly consume 2% of a single core on CentOS/RHEL 7 for
> > example).
> >
> > In most use cases, you don't really care that your logging thread take
> 50µs
> > to wake up when it was idle,
> >
> > Maybe you have a very specific usecase where it make sense to use a
> > "hardcore" strategy to make sure data are logged as fast as possible,
> but I
> > personnaly think that the spin strategy is not really usefull outside of
> > benchmarks when used in a logging framework.
> >
> > Concerning the LiteBlocking strategy, it's still considered as
> experimental
> > according to its javadoc :)
> >
>
> I see "normal" docs here:
>
> https://lmax-exchange.github.io/disruptor/docs/com/lmax/disruptor/LiteBlockingWaitStrategy.html
>
> Looks like 3.3.5 is a the RC stage.
>
> Gary
>
> >
> >
> >
> > 2016-06-14 2:14 GMT+02:00 Remko Popma :
> >
> > > Currently there isn't but there's no real reason not to. That reminds
> me
> > > we should add LiteBlocking (a standard Disruptor wait strategy).
> > >
> > > Sent from my iPhone
> > >
> > > > On 2016/06/14, at 5:50, Matt Sicker  wrote:
> > > >
> > > > Also, is there a way to specify a custom WaitStrategy, or is that
> > > pointless?
> > > >
> > > >> On 13 June 2016 at 13:24, Matt Sicker  wrote:
> > > >>
> > > >> The code has a case for the busy spin strategy, but it's not listed
> on
> > > >> this page:  >.
> > Is
> > > >> this unsupported or should it be added to the docs?
> > > >>
> > > >> --
> > > >> Matt Sicker 
> > > >
> > > >
> > > >
> > > > --
> > > > Matt Sicker 
> > >
> > > -
> > > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> > >
> > >
> >
>
>
>
> --
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> Java Persistence with Hibernate, Second Edition
> 
> JUnit in Action, Second Edition 
> Spring Batch in Action 
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>


Re: Question about async logger wait strategies

2016-06-13 Thread Gary Gregory
On Mon, Jun 13, 2016 at 9:51 PM, Anthony Maire 
wrote:

> Basically you want a logging framework to have as little impact as possible
> on the application. That's why the sleeping strategy is a good
> general-purpose choice : no allocation, no lock for the application
> threads, and a CPU consumption when "idle" that will stay pretty low on
> most OS (it roughly consume 2% of a single core on CentOS/RHEL 7 for
> example).
>
> In most use cases, you don't really care that your logging thread take 50µs
> to wake up when it was idle,
>
> Maybe you have a very specific usecase where it make sense to use a
> "hardcore" strategy to make sure data are logged as fast as possible, but I
> personnaly think that the spin strategy is not really usefull outside of
> benchmarks when used in a logging framework.
>
> Concerning the LiteBlocking strategy, it's still considered as experimental
> according to its javadoc :)
>

I see "normal" docs here:
https://lmax-exchange.github.io/disruptor/docs/com/lmax/disruptor/LiteBlockingWaitStrategy.html

Looks like 3.3.5 is a the RC stage.

Gary

>
>
>
> 2016-06-14 2:14 GMT+02:00 Remko Popma :
>
> > Currently there isn't but there's no real reason not to. That reminds me
> > we should add LiteBlocking (a standard Disruptor wait strategy).
> >
> > Sent from my iPhone
> >
> > > On 2016/06/14, at 5:50, Matt Sicker  wrote:
> > >
> > > Also, is there a way to specify a custom WaitStrategy, or is that
> > pointless?
> > >
> > >> On 13 June 2016 at 13:24, Matt Sicker  wrote:
> > >>
> > >> The code has a case for the busy spin strategy, but it's not listed on
> > >> this page: .
> Is
> > >> this unsupported or should it be added to the docs?
> > >>
> > >> --
> > >> Matt Sicker 
> > >
> > >
> > >
> > > --
> > > Matt Sicker 
> >
> > -
> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >
> >
>



-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition 
Spring Batch in Action 
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


Re: Question about async logger wait strategies

2016-06-13 Thread Anthony Maire
Basically you want a logging framework to have as little impact as possible
on the application. That's why the sleeping strategy is a good
general-purpose choice : no allocation, no lock for the application
threads, and a CPU consumption when "idle" that will stay pretty low on
most OS (it roughly consume 2% of a single core on CentOS/RHEL 7 for
example).

In most use cases, you don't really care that your logging thread take 50µs
to wake up when it was idle,

Maybe you have a very specific usecase where it make sense to use a
"hardcore" strategy to make sure data are logged as fast as possible, but I
personnaly think that the spin strategy is not really usefull outside of
benchmarks when used in a logging framework.

Concerning the LiteBlocking strategy, it's still considered as experimental
according to its javadoc :)



2016-06-14 2:14 GMT+02:00 Remko Popma :

> Currently there isn't but there's no real reason not to. That reminds me
> we should add LiteBlocking (a standard Disruptor wait strategy).
>
> Sent from my iPhone
>
> > On 2016/06/14, at 5:50, Matt Sicker  wrote:
> >
> > Also, is there a way to specify a custom WaitStrategy, or is that
> pointless?
> >
> >> On 13 June 2016 at 13:24, Matt Sicker  wrote:
> >>
> >> The code has a case for the busy spin strategy, but it's not listed on
> >> this page: . Is
> >> this unsupported or should it be added to the docs?
> >>
> >> --
> >> Matt Sicker 
> >
> >
> >
> > --
> > Matt Sicker 
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


Re: Question about async logger wait strategies

2016-06-13 Thread Remko Popma
Currently there isn't but there's no real reason not to. That reminds me we 
should add LiteBlocking (a standard Disruptor wait strategy). 

Sent from my iPhone

> On 2016/06/14, at 5:50, Matt Sicker  wrote:
> 
> Also, is there a way to specify a custom WaitStrategy, or is that pointless?
> 
>> On 13 June 2016 at 13:24, Matt Sicker  wrote:
>> 
>> The code has a case for the busy spin strategy, but it's not listed on
>> this page: . Is
>> this unsupported or should it be added to the docs?
>> 
>> --
>> Matt Sicker 
> 
> 
> 
> -- 
> Matt Sicker 

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question about async logger wait strategies

2016-06-13 Thread Remko Popma
The busy-spin wait strategy is not something I want to promote since it 
basically dedicates a full core to the logging background thread. It's there 
mostly for testing and perhaps for hardcore users who are familiar with the 
Disruptor. 

Sent from my iPhone

> On 2016/06/14, at 3:24, Matt Sicker  wrote:
> 
> The code has a case for the busy spin strategy, but it's not listed on this
> page: . Is this
> unsupported or should it be added to the docs?
> 
> -- 
> Matt Sicker 

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question about async logger wait strategies

2016-06-13 Thread Matt Sicker
Also, is there a way to specify a custom WaitStrategy, or is that pointless?

On 13 June 2016 at 13:24, Matt Sicker  wrote:

> The code has a case for the busy spin strategy, but it's not listed on
> this page: . Is
> this unsupported or should it be added to the docs?
>
> --
> Matt Sicker 
>



-- 
Matt Sicker 


RE: question

2016-03-24 Thread Helm, Mary (MCS Release)
No, there are 2 separate applications.  The logs were generated on Windows and 
viewed on Windows and also generated on Linux and viewed on Linux.

Mary


-Original Message-
From: Gary Gregory [mailto:garydgreg...@gmail.com] 
Sent: Thursday, March 24, 2016 3:37 PM
To: Log4J Users List <log4j-user@logging.apache.org>
Subject: RE: question

Are you generating logs on windows and viewing them on linux or vice versa?

Gary
On Mar 24, 2016 9:55 AM, "Helm, Mary (MCS Release)" <mary.h...@hpe.com>
wrote:

> Yes, an extra empty (or blank) line is appearing between the log 
> statements written by the application code - not by the system itself 
> though.  Anything in the log from JBOSS itself is showing as single-spaced.
>
> Thanks,
> Mary
>
>
> -Original Message-
> From: Remko Popma [mailto:remko.po...@gmail.com]
> Sent: Thursday, March 24, 2016 12:46 PM
> To: Log4J Users List <log4j-user@logging.apache.org>
> Subject: Re: question
>
> Mary, I recommend you raise a Jira ticket for this.
> I don't know about the other Log4j community members, but I currently 
> don't have time to look into this and without a Jira ticket it may 
> quickly drop below my mailbox horizon...
>
> Also, perhaps this is because I'm not a native English speaker, but 
> with "double-spaced" you mean there's an extra empty line between log 
> statements, right?
>
>
> On Fri, Mar 25, 2016 at 1:35 AM, Helm, Mary (MCS Release) < 
> mary.h...@hpe.com
> > wrote:
>
> > Further investigation shows this happens when running on Windows - 
> > not Linux.  The logs are single-spaced on Linux but double-spaced on 
> > Windows using this log4j2.xml
> >
> > 
> > 
> > 
> > 
> > %d [%10.10t] %-5.5p %30.30c{2} - %m%n
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > Thanks,
> > Mary
> >
> > -Original Message-
> > From: Helm, Mary (MCS Release)
> > Sent: Thursday, February 18, 2016 11:51 AM
> > To: log4j-user@logging.apache.org
> > Subject: question
> >
> > We have noticed this behavior on app servers running either JBOSS 
> > EAP
> > 6.4 or Wildfly 9.0.1 Final.
> >
> >
> >
> > We are using the Console appender within our log4j2.xml file for our 
> > web-app and we are seeing that any log4j2 messages written to the 
> > log are formatted as double-spaced. Removing the "%n" from our 
> > log4j2.xml pattern results in the log4j2 messages appearing on a single 
> > line.
> >
> > Is there a way to single space all the information that is logged in 
> > the same file?  We do want both the JBOSS and application messages 
> > in the same server.log file.
> >
> >
> >
> > Mary T. Helm
> > Services Information Developer IV, CEM/JAVA SME Medicare Part  B 
> > Shared System Claims Processing Maintenance Medicare Systems High 
> > Maturity Group an SEI CMMI Level 5 Organization Hewlett Packard 
> > Enterprise Telephone +1
> > 717.547.7791 Email mary.h...@hpe.com<mailto:mary.h...@hpe.com>
> > 1250 Camp Hill Bypass  MS 1-400
> > Camp Hill, PA 17011
> > CONFIDENTIALITY NOTICE: This e-mail message, including any 
> > attachments, is for the sole use of the intended recipient's) and 
> > may contain HP Internal or HP Confidential information. Any 
> > unauthorized review, use, disclosure or distribution is prohibited. 
> > If you are not the intended recipient, please contact the sender by 
> > reply e-mail and destroy all copies of the original message.
> >
> >
> > 
> > - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: question

2016-03-24 Thread Gary Gregory
Are you generating logs on windows and viewing them on linux or vice versa?

Gary
On Mar 24, 2016 9:55 AM, "Helm, Mary (MCS Release)" <mary.h...@hpe.com>
wrote:

> Yes, an extra empty (or blank) line is appearing between the log
> statements written by the application code - not by the system itself
> though.  Anything in the log from JBOSS itself is showing as single-spaced.
>
> Thanks,
> Mary
>
>
> -Original Message-
> From: Remko Popma [mailto:remko.po...@gmail.com]
> Sent: Thursday, March 24, 2016 12:46 PM
> To: Log4J Users List <log4j-user@logging.apache.org>
> Subject: Re: question
>
> Mary, I recommend you raise a Jira ticket for this.
> I don't know about the other Log4j community members, but I currently
> don't have time to look into this and without a Jira ticket it may quickly
> drop below my mailbox horizon...
>
> Also, perhaps this is because I'm not a native English speaker, but with
> "double-spaced" you mean there's an extra empty line between log
> statements, right?
>
>
> On Fri, Mar 25, 2016 at 1:35 AM, Helm, Mary (MCS Release) <
> mary.h...@hpe.com
> > wrote:
>
> > Further investigation shows this happens when running on Windows - not
> > Linux.  The logs are single-spaced on Linux but double-spaced on
> > Windows using this log4j2.xml
> >
> > 
> > 
> > 
> > 
> > %d [%10.10t] %-5.5p %30.30c{2} - %m%n
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > Thanks,
> > Mary
> >
> > -Original Message-
> > From: Helm, Mary (MCS Release)
> > Sent: Thursday, February 18, 2016 11:51 AM
> > To: log4j-user@logging.apache.org
> > Subject: question
> >
> > We have noticed this behavior on app servers running either JBOSS EAP
> > 6.4 or Wildfly 9.0.1 Final.
> >
> >
> >
> > We are using the Console appender within our log4j2.xml file for our
> > web-app and we are seeing that any log4j2 messages written to the log
> > are formatted as double-spaced. Removing the "%n" from our log4j2.xml
> > pattern results in the log4j2 messages appearing on a single line.
> >
> > Is there a way to single space all the information that is logged in
> > the same file?  We do want both the JBOSS and application messages in
> > the same server.log file.
> >
> >
> >
> > Mary T. Helm
> > Services Information Developer IV, CEM/JAVA SME Medicare Part  B
> > Shared System Claims Processing Maintenance Medicare Systems High
> > Maturity Group an SEI CMMI Level 5 Organization Hewlett Packard
> > Enterprise Telephone +1
> > 717.547.7791 Email mary.h...@hpe.com<mailto:mary.h...@hpe.com>
> > 1250 Camp Hill Bypass  MS 1-400
> > Camp Hill, PA 17011
> > CONFIDENTIALITY NOTICE: This e-mail message, including any
> > attachments, is for the sole use of the intended recipient's) and may
> > contain HP Internal or HP Confidential information. Any unauthorized
> > review, use, disclosure or distribution is prohibited. If you are not
> > the intended recipient, please contact the sender by reply e-mail and
> > destroy all copies of the original message.
> >
> >
> > -
> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


RE: question

2016-03-24 Thread Helm, Mary (MCS Release)
Yes, an extra empty (or blank) line is appearing between the log statements 
written by the application code - not by the system itself though.  Anything in 
the log from JBOSS itself is showing as single-spaced. 

Thanks,
Mary


-Original Message-
From: Remko Popma [mailto:remko.po...@gmail.com] 
Sent: Thursday, March 24, 2016 12:46 PM
To: Log4J Users List <log4j-user@logging.apache.org>
Subject: Re: question

Mary, I recommend you raise a Jira ticket for this.
I don't know about the other Log4j community members, but I currently don't 
have time to look into this and without a Jira ticket it may quickly drop below 
my mailbox horizon...

Also, perhaps this is because I'm not a native English speaker, but with 
"double-spaced" you mean there's an extra empty line between log statements, 
right?


On Fri, Mar 25, 2016 at 1:35 AM, Helm, Mary (MCS Release) <mary.h...@hpe.com
> wrote:

> Further investigation shows this happens when running on Windows - not 
> Linux.  The logs are single-spaced on Linux but double-spaced on 
> Windows using this log4j2.xml
>
> 
> 
> 
> 
> %d [%10.10t] %-5.5p %30.30c{2} - %m%n
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> Thanks,
> Mary
>
> -Original Message-
> From: Helm, Mary (MCS Release)
> Sent: Thursday, February 18, 2016 11:51 AM
> To: log4j-user@logging.apache.org
> Subject: question
>
> We have noticed this behavior on app servers running either JBOSS EAP 
> 6.4 or Wildfly 9.0.1 Final.
>
>
>
> We are using the Console appender within our log4j2.xml file for our 
> web-app and we are seeing that any log4j2 messages written to the log 
> are formatted as double-spaced. Removing the "%n" from our log4j2.xml 
> pattern results in the log4j2 messages appearing on a single line.
>
> Is there a way to single space all the information that is logged in 
> the same file?  We do want both the JBOSS and application messages in 
> the same server.log file.
>
>
>
> Mary T. Helm
> Services Information Developer IV, CEM/JAVA SME Medicare Part  B 
> Shared System Claims Processing Maintenance Medicare Systems High 
> Maturity Group an SEI CMMI Level 5 Organization Hewlett Packard 
> Enterprise Telephone +1
> 717.547.7791 Email mary.h...@hpe.com<mailto:mary.h...@hpe.com>
> 1250 Camp Hill Bypass  MS 1-400
> Camp Hill, PA 17011
> CONFIDENTIALITY NOTICE: This e-mail message, including any 
> attachments, is for the sole use of the intended recipient's) and may 
> contain HP Internal or HP Confidential information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not 
> the intended recipient, please contact the sender by reply e-mail and 
> destroy all copies of the original message.
>
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: question

2016-03-24 Thread Remko Popma
Mary, I recommend you raise a Jira ticket for this.
I don't know about the other Log4j community members, but I currently don't
have time to look into this and without a Jira ticket it may quickly drop
below my mailbox horizon...

Also, perhaps this is because I'm not a native English speaker, but with
"double-spaced" you mean there's an extra empty line between log
statements, right?


On Fri, Mar 25, 2016 at 1:35 AM, Helm, Mary (MCS Release)  wrote:

> Further investigation shows this happens when running on Windows - not
> Linux.  The logs are single-spaced on Linux but double-spaced on Windows
> using this log4j2.xml
>
> 
> 
> 
> 
> %d [%10.10t] %-5.5p %30.30c{2} - %m%n
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> Thanks,
> Mary
>
> -Original Message-
> From: Helm, Mary (MCS Release)
> Sent: Thursday, February 18, 2016 11:51 AM
> To: log4j-user@logging.apache.org
> Subject: question
>
> We have noticed this behavior on app servers running either JBOSS EAP 6.4
> or Wildfly 9.0.1 Final.
>
>
>
> We are using the Console appender within our log4j2.xml file for our
> web-app and we are seeing that any log4j2 messages written to the log are
> formatted as double-spaced. Removing the "%n" from our log4j2.xml pattern
> results in the log4j2 messages appearing on a single line.
>
> Is there a way to single space all the information that is logged in the
> same file?  We do want both the JBOSS and application messages in the same
> server.log file.
>
>
>
> Mary T. Helm
> Services Information Developer IV, CEM/JAVA SME Medicare Part  B Shared
> System Claims Processing Maintenance Medicare Systems High Maturity Group
> an SEI CMMI Level 5 Organization Hewlett Packard Enterprise Telephone +1
> 717.547.7791 Email mary.h...@hpe.com
> 1250 Camp Hill Bypass  MS 1-400
> Camp Hill, PA 17011
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
> for the sole use of the intended recipient's) and may contain HP Internal
> or HP Confidential information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> contact the sender by reply e-mail and destroy all copies of the original
> message.
>
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


RE: question

2016-03-24 Thread Helm, Mary (MCS Release)
Further investigation shows this happens when running on Windows - not Linux.  
The logs are single-spaced on Linux but double-spaced on Windows using this 
log4j2.xml





%d [%10.10t] %-5.5p %30.30c{2} - %m%n











Thanks,
Mary

-Original Message-
From: Helm, Mary (MCS Release) 
Sent: Thursday, February 18, 2016 11:51 AM
To: log4j-user@logging.apache.org
Subject: question

We have noticed this behavior on app servers running either JBOSS EAP 6.4 or 
Wildfly 9.0.1 Final.



We are using the Console appender within our log4j2.xml file for our web-app 
and we are seeing that any log4j2 messages written to the log are formatted as 
double-spaced. Removing the "%n" from our log4j2.xml pattern results in the 
log4j2 messages appearing on a single line.

Is there a way to single space all the information that is logged in the same 
file?  We do want both the JBOSS and application messages in the same 
server.log file.



Mary T. Helm
Services Information Developer IV, CEM/JAVA SME Medicare Part  B Shared System 
Claims Processing Maintenance Medicare Systems High Maturity Group an SEI CMMI 
Level 5 Organization Hewlett Packard Enterprise Telephone +1 717.547.7791 Email 
mary.h...@hpe.com
1250 Camp Hill Bypass  MS 1-400
Camp Hill, PA 17011
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for 
the sole use of the intended recipient's) and may contain HP Internal or HP 
Confidential information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, please 
contact the sender by reply e-mail and destroy all copies of the original 
message.


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question - RollingFileAppender creates empty files

2015-09-17 Thread Csilla Fabian

I have several appenders set up, I'm getting one file for one appender, but 
some appenders might be unused by the system, that's why there are empty log 
files.
But I think you answered my question, it's not possible to set up the appender 
in the XML config file to create the log file only in case if there's something 
that needs to be written to it.


- Original Message -
From: "Ralph Goers" <ralph.go...@dslextreme.com>
To: "log4j-user" <log4j-user@logging.apache.org>
Sent: Wednesday, September 16, 2015 6:01:55 PM
Subject: Re: Question - RollingFileAppender creates empty files

The files are created as soon as the output stream is opened. This happens when 
the Appender starts.  I’d have to see your configuration to understand why you 
would be getting multiple files though.

Ralph

> On Sep 16, 2015, at 7:23 AM, Csilla Fabian <csilla.fab...@sde.cz> wrote:
> 
> Hello,
> 
>  I'm using log4j2 RollingFileAppenders to log events of a complex system. My 
> problem is that empty log files are created for every appender even if the 
> given subsystem has nothing to write to them. Is there any way to restrict 
> the number of files using just the XML configuration file? I could find only 
> programmatic solutions.
> Thank you for the answer.
> 
> Regards,
> Csilla Fabian, SDE
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question - RollingFileAppender creates empty files

2015-09-17 Thread Ralph Goers
I was thinking more along the lines of an attribute named “deferCreate”.  

Ralph

> On Sep 17, 2015, at 7:49 AM, Gary Gregory <garydgreg...@gmail.com> wrote:
> 
> You could provide a patch that either:
> 
> - Deletes empty files on Log4j shutdown. Would this be an option or always
> happen?
> - Creates files on-demand. Would this be an option or always happen?
> 
> Gary
> 
> On Wed, Sep 16, 2015 at 11:49 PM, Csilla Fabian <csilla.fab...@sde.cz>
> wrote:
> 
>> 
>> I have several appenders set up, I'm getting one file for one appender,
>> but some appenders might be unused by the system, that's why there are
>> empty log files.
>> But I think you answered my question, it's not possible to set up the
>> appender in the XML config file to create the log file only in case if
>> there's something that needs to be written to it.
>> 
>> 
>> - Original Message -
>> From: "Ralph Goers" <ralph.go...@dslextreme.com>
>> To: "log4j-user" <log4j-user@logging.apache.org>
>> Sent: Wednesday, September 16, 2015 6:01:55 PM
>> Subject: Re: Question - RollingFileAppender creates empty files
>> 
>> The files are created as soon as the output stream is opened. This happens
>> when the Appender starts.  I’d have to see your configuration to understand
>> why you would be getting multiple files though.
>> 
>> Ralph
>> 
>>> On Sep 16, 2015, at 7:23 AM, Csilla Fabian <csilla.fab...@sde.cz> wrote:
>>> 
>>> Hello,
>>> 
>>> I'm using log4j2 RollingFileAppenders to log events of a complex
>> system. My problem is that empty log files are created for every appender
>> even if the given subsystem has nothing to write to them. Is there any way
>> to restrict the number of files using just the XML configuration file? I
>> could find only programmatic solutions.
>>> Thank you for the answer.
>>> 
>>> Regards,
>>> Csilla Fabian, SDE
>>> 
>>> -
>>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>> 
>>> 
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>> 
>> -
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>> 
>> 
> 
> 
> -- 
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question - RollingFileAppender creates empty files

2015-09-17 Thread Gary Gregory
You could provide a patch that either:

- Deletes empty files on Log4j shutdown. Would this be an option or always
happen?
- Creates files on-demand. Would this be an option or always happen?

Gary

On Wed, Sep 16, 2015 at 11:49 PM, Csilla Fabian <csilla.fab...@sde.cz>
wrote:

>
> I have several appenders set up, I'm getting one file for one appender,
> but some appenders might be unused by the system, that's why there are
> empty log files.
> But I think you answered my question, it's not possible to set up the
> appender in the XML config file to create the log file only in case if
> there's something that needs to be written to it.
>
>
> - Original Message -
> From: "Ralph Goers" <ralph.go...@dslextreme.com>
> To: "log4j-user" <log4j-user@logging.apache.org>
> Sent: Wednesday, September 16, 2015 6:01:55 PM
> Subject: Re: Question - RollingFileAppender creates empty files
>
> The files are created as soon as the output stream is opened. This happens
> when the Appender starts.  I’d have to see your configuration to understand
> why you would be getting multiple files though.
>
> Ralph
>
> > On Sep 16, 2015, at 7:23 AM, Csilla Fabian <csilla.fab...@sde.cz> wrote:
> >
> > Hello,
> >
> >  I'm using log4j2 RollingFileAppenders to log events of a complex
> system. My problem is that empty log files are created for every appender
> even if the given subsystem has nothing to write to them. Is there any way
> to restrict the number of files using just the XML configuration file? I
> could find only programmatic solutions.
> > Thank you for the answer.
> >
> > Regards,
> > Csilla Fabian, SDE
> >
> > -
> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


Re: Question - RollingFileAppender creates empty files

2015-09-16 Thread Remko Popma
Hi,
Can you provide your configuration file?
Remko

On Wed, Sep 16, 2015 at 11:23 PM, Csilla Fabian 
wrote:

> Hello,
>
>   I'm using log4j2 RollingFileAppenders to log events of a complex system.
> My problem is that empty log files are created for every appender even if
> the given subsystem has nothing to write to them. Is there any way to
> restrict the number of files using just the XML configuration file? I could
> find only programmatic solutions.
> Thank you for the answer.
>
> Regards,
> Csilla Fabian, SDE
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


Re: Question - RollingFileAppender creates empty files

2015-09-16 Thread Ralph Goers
The files are created as soon as the output stream is opened. This happens when 
the Appender starts.  I’d have to see your configuration to understand why you 
would be getting multiple files though.

Ralph

> On Sep 16, 2015, at 7:23 AM, Csilla Fabian  wrote:
> 
> Hello,
> 
>  I'm using log4j2 RollingFileAppenders to log events of a complex system. My 
> problem is that empty log files are created for every appender even if the 
> given subsystem has nothing to write to them. Is there any way to restrict 
> the number of files using just the XML configuration file? I could find only 
> programmatic solutions.
> Thank you for the answer.
> 
> Regards,
> Csilla Fabian, SDE
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question about RollingFileAppender

2015-09-02 Thread Remko Popma
Jerry, 
As of now, log4j 2 does not support auto-delete on rollover. However, this is a 
commonly requested feature and is on the todo list. We just haven't gotten 
around to working on it yet. 

The relevant Jira ticket is https://issues.apache.org/jira/browse/LOG4J2-435

Remko

Sent from my iPhone

> On 2015/09/03, at 7:06, "Boyang\(Jerry\) Peng" 
>  wrote:
> 
> Hello,
> I am using RollingFileAppender to limit the number of log files.  Is there a 
> way to use the
> Default Rollover Strategy with a time %d{-MM-dd-HH-mm-ss} with a 
>  and set  max="9"/>?  How can use a time based format for the name of my log but limit 
> the number of logs to a certain number and after the limit is reached the 
> oldest log gets deleted? Is there a way to do this?
> 
> Best,
> Jerry

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question about using log4j

2015-07-06 Thread Gary Gregory
If the machine crashes, open files are at the whim of your OS... The '@'
are probably what is on the disk near the end of the file.

Gary

On Wed, Jul 1, 2015 at 1:43 AM, dyf6372 dyf6...@163.com wrote:

 We use log4j to print the log about our system. Sometimes the computer
 will be crashed and reboot. Before the computer down, the log4j will print
 many @. I want to know what the meaning of “@“ is and when it will
 appear. Thank you very much!


 My Best Wishes!
 董一峰
 15201346372
 dyf6...@163.com dyf6...@gmail.com




-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition
http://www.manning.com/bauer3/
JUnit in Action, Second Edition http://www.manning.com/tahchiev/
Spring Batch in Action http://www.manning.com/templier/
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


RE: Question regarding Log4J 2

2013-11-11 Thread Gary Gregory
It feels like we are pretty close. Maybe a month, maybe two. 

Gary

 Original message 
From: anuj kumar anuj.gandh...@gmail.com 
Date:11/11/2013  07:32  (GMT-05:00) 
To: log4j-user@logging.apache.org 
Subject: Question regarding Log4J 2 

Hi,
I am planning to use Log4J 2 in my application but I see that it is still
in Beta phase. Can someone tell me when I can expect a FINAL version of
Log4J 2?

Thanks,
-- 
*Anuj Kumar*


Re: Question about file locking

2010-03-17 Thread Curt Arnold

On Mar 17, 2010, at 10:13 AM, Tasso Angelidis wrote:

 I'm using log4j in a pretty vanilla way... No extra applications logging to 
 the same file... 1 logger per class. Using RollingFileAppender...
 
 Is the file exclusively locked or share locked?
 
 And for Windows we all know that sometimes a file can remain locked after 
 unexpected program termination how is this dealt with?
 

All the built-in file appenders predate the introduction of java.nio which 
added O/S level locking mechanisms.  There is nothing at the log4j level that 
attempts to lock or to release locks.  All that stuff is at the JVM level and 
is Java implementation specific.
-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: Question about using org.apache.log4j.rolling.RollingFileAppender

2010-03-16 Thread Doal Miller
Thanks for the reply. I can probably get away with using 
TimeBasedRollingPolicy. If not maybe I'll look into the work you proposed. 
Thanks.

Doal Miller
Sr. Software Engineer



Real-Time Universal Notification  Response Technology(tm)

Direct:   858.724.1278
Cell:  760.613.6960
Email:   doal.mil...@mir3.com

Click here to experience the MIR3 demo 



-Original Message-
From: Curt Arnold [mailto:curt.ar...@gmail.com] On Behalf Of Curt Arnold
Sent: Monday, March 15, 2010 8:27 PM
To: Log4J Users List
Subject: Re: Question about using org.apache.log4j.rolling.RollingFileAppender


On Mar 15, 2010, at 6:48 PM, Doal Miller wrote:

 I've been playing around with the RollingFileAppender out of the extra jar 
 and I've gotten it working in a couple of different ways but I'm not getting 
 exactly what I want.
 
 What I want is to roll a file when the maximum size is reached and to keep a 
 large number of files around, like around 250. With my following 
 configuration file it rolls at 10,000 bytes but the FixedWindowRollingPolicy 
 doesn't allow me to keep over 12 files. If I try to set MaxIndex higher than 
 12 it complains and resets it. I tried using the TimeBasedRollingPolicy 
 instead, in conjunction with SizeBasedTriggeringPolicy but I guess 
 TimeBasedRollingPolicy uses its own triggering policy.
 
 Is there a way to set the max number of files for the 
 FixedWindowRollingPolicy to 250 without cracking open the code?
 
 Thanks in advance for any suggestions.
 
 The limit on maximum files was added since things get very slow if you rename 
250 files one at a time (delete .250, rename .249 to .250, rename .248 to .249, 
etc).

Renaming log files is inherently risky and platform dependent.  Writing an RFA 
alternative using java.nio and avoiding renames has been on my to-do list for a 
long time.
-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.436 / Virus Database: 271.1.1/2745 - Release Date: 03/15/10 
19:33:00

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Question about using org.apache.log4j.rolling.RollingFileAppender

2010-03-15 Thread Curt Arnold

On Mar 15, 2010, at 6:48 PM, Doal Miller wrote:

 I've been playing around with the RollingFileAppender out of the extra jar 
 and I've gotten it working in a couple of different ways but I'm not getting 
 exactly what I want.
 
 What I want is to roll a file when the maximum size is reached and to keep a 
 large number of files around, like around 250. With my following 
 configuration file it rolls at 10,000 bytes but the FixedWindowRollingPolicy 
 doesn't allow me to keep over 12 files. If I try to set MaxIndex higher than 
 12 it complains and resets it. I tried using the TimeBasedRollingPolicy 
 instead, in conjunction with SizeBasedTriggeringPolicy but I guess 
 TimeBasedRollingPolicy uses its own triggering policy.
 
 Is there a way to set the max number of files for the 
 FixedWindowRollingPolicy to 250 without cracking open the code?
 
 Thanks in advance for any suggestions.
 
 The limit on maximum files was added since things get very slow if you rename 
250 files one at a time (delete .250, rename .249 to .250, rename .248 to .249, 
etc).

Renaming log files is inherently risky and platform dependent.  Writing an RFA 
alternative using java.nio and avoiding renames has been on my to-do list for a 
long time.
-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: Question for CustomSQLDBReceiver

2008-07-03 Thread Scott Deboy
http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/log4j/db/CustomSQLDBReceiver.html

Add your jdbc jar to the $userhome/.chainsaw/plugins folder and update your 
chainsaw xml config file to use the receiver (see the Welcome tab - there's a 
'view example receiver configuration' button on that tab which contains an 
example configuration file.

The receiver essentially requires you to define aliases from your columns to 
fixed columns the receiver is going to use to run the query.  It also supports 
an IDField param, which is assumed to be an auto-incrementing int, which will 
allow you to 'tail' the events from the database when running the query 
multiple times (if the refreshMillis param is defined).


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: Rally, Varun [mailto:[EMAIL PROTECTED]
Sent: Thu 7/3/2008 9:12 AM
To: log4j-user@logging.apache.org
Subject: Question for CustomSQLDBReceiver
 
Hello All,

 

I am new to Chainsaw and want to use CustomSQLDBReceiver. Though I have
got an idea of what it is, I am not able to get it running. Please
provide me an internet link or URL that explains the steps to use a
CustomSQLDBReceiver.

 

Thanks in anticipation.

 

Regards,
Varun 

 



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

RE: Question for CustomSQLDBReceiver

2008-07-03 Thread Rally, Varun
I created a table with the following statement.

 

1) CREATE TABLE  `userdb`.`sys_log` (

 

  `log_id` int(10) unsigned NOT NULL auto_increment,

 

  `log_date` timestamp NOT NULL default CURRENT_TIMESTAMP,

 

  `sys_name` varchar(45) NOT NULL,

 

  `machine_name` varchar(45) NOT NULL,

 

  `class_name` varchar(45) NOT NULL,

 

  `priority` varchar(45) NOT NULL,

 

  `message` varchar(45) default NULL,

 

  `extended_message` varchar(45) default NULL,

 

  `user_id` int(10) unsigned NOT NULL,

 

  `method_name` varchar(45) NOT NULL,

 

  PRIMARY KEY  (`log_id`)

 

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

 

 

My config file is like this...

 

2) ?xml version=1.0 encoding=UTF-8 ?

 

!DOCTYPE log4j:configuration 

 

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;

debug=true

 

   appender name=A2 class=org.apache.log4j.ConsoleAppender

 

  layout class=org.apache.log4j.SimpleLayout/

 

   /appender

 

  plugin name=CustomDBReceiver

class=org.apache.log4j.db.CustomSQLDBReceiver

 

  connectionSource

class=org.apache.log4j.db.DriverManagerConnectionSource

 

param name=password value=admin/

 

param name=user value=root/

 

param name=driverClass value=org.gjt.mm.mysql.Driver/

 

param name=url value=jdbc:mysql://127.0.0.1/user_db/

 

  /connectionSource

 

  param name=refreshMillis value=5000/

 

  param name=sql value='select logger as LOGGER, log_date as

TIMESTAMP, priority as LEVEL, message as MESSAGE, class_name as CLASS,

method_name as METHOD,

concat({{application,databaselogs,hostname,mymachine,log4jid,,

COUNTER, }}) as PROPERTIES,  as EXCEPTION from sys_log'/

 

  THREAD,  NDC, MDC, FILE, LINE, PROPERTIES, THROWABLE

 

  param name=IDField value=log_id/

 

   /plugin

 

   root

 

  level value=debug/

 

   /root

 

/log4j:configuration

 

 

I also setup automatic configuration script to point to my config file

in chainsaw. But when I open chainsaw, nothing happens. I have also put
the MySQL driver .jar file in .chainsaw/plugins directory.

 

Please let me know what I am missing.

 

 

Regards,

Varun Rally

---

Fiserv, A-94/8, SECTOR 58 NOIDA UP INDIA 201301

Phone- 91-120-4023000  extn. 3268 Cell- 91-98990-37800

VOIP - 434-509-0698 Extn. 121

US Phone- 001-303-293-2223 Extn. 22814

 

 

-Original Message-
From: Scott Deboy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 10:29 AM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver

 

http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/
log4j/db/CustomSQLDBReceiver.html

 

Add your jdbc jar to the $userhome/.chainsaw/plugins folder and update
your chainsaw xml config file to use the receiver (see the Welcome tab -
there's a 'view example receiver configuration' button on that tab which
contains an example configuration file.

 

The receiver essentially requires you to define aliases from your
columns to fixed columns the receiver is going to use to run the query.
It also supports an IDField param, which is assumed to be an
auto-incrementing int, which will allow you to 'tail' the events from
the database when running the query multiple times (if the refreshMillis
param is defined).

 

 

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: Rally, Varun [mailto:[EMAIL PROTECTED]

Sent: Thu 7/3/2008 9:12 AM

To: log4j-user@logging.apache.org

Subject: Question for CustomSQLDBReceiver

 

Hello All,

 

 

 

I am new to Chainsaw and want to use CustomSQLDBReceiver. Though I have

got an idea of what it is, I am not able to get it running. Please

provide me an internet link or URL that explains the steps to use a

CustomSQLDBReceiver.

 

 

 

Thanks in anticipation.

 

 

 

Regards,

Varun 

 

 

 

 

 



RE: Question for CustomSQLDBReceiver

2008-07-03 Thread Scott Deboy
How to use CustomSQLDBReceiver:

1. create a $userhome/.chainsaw/plugins folder
2. copy your jdbc driver to the plugins folder
3. the Chainsaw downloads page links to an 'inportant distribution notes' link 
for more info about extended features - go there and follow the instructions 
for what you're trying to do (db extensions)
4. create a chainsaw xml config file containing a customsqldbreceiver section
4a. make sure to follow the directions in the class javadoc for the receiver 
for setting up the 'sql' param (read: all fields must be aliased!!)
5. change Chainsaw's 'automatic configuration url' to the URL of the chainsaw 
xml config file (view-show application wide preferences menu)
7. you may need to check the 'ok to remove security manager' checkbox as well 
(on the same prefs screen)
8. restart Chainsaw

You should have a receiver defined in the receivers panel.  If you don't, you 
haven't got the URL entered correctly in the application-wide prefs screen, or 
the chainsaw XML config isn't defining the receiver configuration correctly 
(see an example of a receiver config on the Welcome tab's 'view example 
receiver configuration' button).  If you can't figure this out, turn on your 
java console, pre-configuration Chainsaw logging goes there.

If you don't get a new tab containing your db's events, examine Chainsaw's own 
logging in the chainsaw-log tab - it should explain what the problem is.

If you still have problems, feel free to email the list.


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: Rally, Varun [mailto:[EMAIL PROTECTED]
Sent: Thu 7/3/2008 12:44 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver
 
I created a table with the following statement.

 

1) CREATE TABLE  `userdb`.`sys_log` (

 

  `log_id` int(10) unsigned NOT NULL auto_increment,

 

  `log_date` timestamp NOT NULL default CURRENT_TIMESTAMP,

 

  `sys_name` varchar(45) NOT NULL,

 

  `machine_name` varchar(45) NOT NULL,

 

  `class_name` varchar(45) NOT NULL,

 

  `priority` varchar(45) NOT NULL,

 

  `message` varchar(45) default NULL,

 

  `extended_message` varchar(45) default NULL,

 

  `user_id` int(10) unsigned NOT NULL,

 

  `method_name` varchar(45) NOT NULL,

 

  PRIMARY KEY  (`log_id`)

 

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

 

 

My config file is like this...

 

2) ?xml version=1.0 encoding=UTF-8 ?

 

!DOCTYPE log4j:configuration 

 

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;

debug=true

 

   appender name=A2 class=org.apache.log4j.ConsoleAppender

 

  layout class=org.apache.log4j.SimpleLayout/

 

   /appender

 

  plugin name=CustomDBReceiver

class=org.apache.log4j.db.CustomSQLDBReceiver

 

  connectionSource

class=org.apache.log4j.db.DriverManagerConnectionSource

 

param name=password value=admin/

 

param name=user value=root/

 

param name=driverClass value=org.gjt.mm.mysql.Driver/

 

param name=url value=jdbc:mysql://127.0.0.1/user_db/

 

  /connectionSource

 

  param name=refreshMillis value=5000/

 

  param name=sql value='select logger as LOGGER, log_date as

TIMESTAMP, priority as LEVEL, message as MESSAGE, class_name as CLASS,

method_name as METHOD,

concat({{application,databaselogs,hostname,mymachine,log4jid,,

COUNTER, }}) as PROPERTIES,  as EXCEPTION from sys_log'/

 

  THREAD,  NDC, MDC, FILE, LINE, PROPERTIES, THROWABLE

 

  param name=IDField value=log_id/

 

   /plugin

 

   root

 

  level value=debug/

 

   /root

 

/log4j:configuration

 

 

I also setup automatic configuration script to point to my config file

in chainsaw. But when I open chainsaw, nothing happens. I have also put
the MySQL driver .jar file in .chainsaw/plugins directory.

 

Please let me know what I am missing.

 

 

Regards,

Varun Rally

---

Fiserv, A-94/8, SECTOR 58 NOIDA UP INDIA 201301

Phone- 91-120-4023000  extn. 3268 Cell- 91-98990-37800

VOIP - 434-509-0698 Extn. 121

US Phone- 001-303-293-2223 Extn. 22814

 

 

-Original Message-
From: Scott Deboy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 10:29 AM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver

 

http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/
log4j/db/CustomSQLDBReceiver.html

 

Add your jdbc jar to the $userhome/.chainsaw/plugins folder and update
your chainsaw xml config file to use the receiver (see the Welcome tab -
there's a 'view example receiver configuration' button on that tab which
contains an example configuration file.

 

The receiver essentially requires you to define aliases from your
columns to fixed columns the receiver is going to use to run the query.
It also

RE: Question for CustomSQLDBReceiver

2008-07-03 Thread Rally, Varun
Hello,

I believe I am doing all of the steps mentioned below. I think the issue
is with the configuration file where I have the SQL.

In CustomSQLDBReceiver, there is an example query

select logger as LOGGER, timestamp as TIMESTAMP, level as LEVEL, thread
as THREAD, message as MESSAGE, ndc as NDC, mdc as MDC, class as CLASS,
method as METHOD, file as FILE, line as LINE,
concat({{application,databaselogs,hostname,mymachine, log4jid,,
COUNTER,}}) as PROPERTIES,  as THROWABLE from logtable

I have 1 question in the above statement.
1) Do I need to have all the columns as part of table? Right now my
table structure is not having following columns
THREAD,NDC, MDC, FILE, LINE, PROPERTIES, THROWABLE (If these columns are
required, what should be their respective data types).

Regards,
Varun Rally
---
Fiserv, A-94/8, SECTOR 58 NOIDA UP INDIA 201301
Phone- 91-120-4023000  extn. 3268 Cell- 91-98990-37800
VOIP - 434-509-0698 Extn. 121
US Phone- 001-303-293-2223 Extn. 22814


-Original Message-
From: Scott Deboy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 1:51 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver

How to use CustomSQLDBReceiver:

1. create a $userhome/.chainsaw/plugins folder
2. copy your jdbc driver to the plugins folder
3. the Chainsaw downloads page links to an 'inportant distribution
notes' link for more info about extended features - go there and follow
the instructions for what you're trying to do (db extensions)
4. create a chainsaw xml config file containing a customsqldbreceiver
section
4a. make sure to follow the directions in the class javadoc for the
receiver for setting up the 'sql' param (read: all fields must be
aliased!!)
5. change Chainsaw's 'automatic configuration url' to the URL of the
chainsaw xml config file (view-show application wide preferences menu)
7. you may need to check the 'ok to remove security manager' checkbox as
well (on the same prefs screen)
8. restart Chainsaw

You should have a receiver defined in the receivers panel.  If you
don't, you haven't got the URL entered correctly in the application-wide
prefs screen, or the chainsaw XML config isn't defining the receiver
configuration correctly (see an example of a receiver config on the
Welcome tab's 'view example receiver configuration' button).  If you
can't figure this out, turn on your java console, pre-configuration
Chainsaw logging goes there.

If you don't get a new tab containing your db's events, examine
Chainsaw's own logging in the chainsaw-log tab - it should explain what
the problem is.

If you still have problems, feel free to email the list.


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: Rally, Varun [mailto:[EMAIL PROTECTED]
Sent: Thu 7/3/2008 12:44 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver
 
I created a table with the following statement.

 

1) CREATE TABLE  `userdb`.`sys_log` (

 

  `log_id` int(10) unsigned NOT NULL auto_increment,

 

  `log_date` timestamp NOT NULL default CURRENT_TIMESTAMP,

 

  `sys_name` varchar(45) NOT NULL,

 

  `machine_name` varchar(45) NOT NULL,

 

  `class_name` varchar(45) NOT NULL,

 

  `priority` varchar(45) NOT NULL,

 

  `message` varchar(45) default NULL,

 

  `extended_message` varchar(45) default NULL,

 

  `user_id` int(10) unsigned NOT NULL,

 

  `method_name` varchar(45) NOT NULL,

 

  PRIMARY KEY  (`log_id`)

 

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

 

 

My config file is like this...

 

2) ?xml version=1.0 encoding=UTF-8 ?

 

!DOCTYPE log4j:configuration 

 

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;

debug=true

 

   appender name=A2 class=org.apache.log4j.ConsoleAppender

 

  layout class=org.apache.log4j.SimpleLayout/

 

   /appender

 

  plugin name=CustomDBReceiver

class=org.apache.log4j.db.CustomSQLDBReceiver

 

  connectionSource

class=org.apache.log4j.db.DriverManagerConnectionSource

 

param name=password value=admin/

 

param name=user value=root/

 

param name=driverClass value=org.gjt.mm.mysql.Driver/

 

param name=url value=jdbc:mysql://127.0.0.1/user_db/

 

  /connectionSource

 

  param name=refreshMillis value=5000/

 

  param name=sql value='select logger as LOGGER, log_date as

TIMESTAMP, priority as LEVEL, message as MESSAGE, class_name as CLASS,

method_name as METHOD,

concat({{application,databaselogs,hostname,mymachine,log4jid,,

COUNTER, }}) as PROPERTIES,  as EXCEPTION from sys_log'/

 

  THREAD,  NDC, MDC, FILE, LINE, PROPERTIES, THROWABLE

 

  param name=IDField value=log_id/

 

   /plugin

 

   root

 

  level value=debug/

 

   /root

 

/log4j:configuration

 

 

I also setup

RE: Question for CustomSQLDBReceiver

2008-07-03 Thread Scott Deboy
The receiver needs all of the columns to be in the result set that it's 
creating events from.  You DO NOT need to have all of the columns in your 
schema - you just need to make sure the resultset being built contains the 
columns. 

You do this by using aliases to rename or add missing columns, and specifying 
default values if the column is missing

Examples:

If you have a column named THREAD, just include THREAD as one of the columns 
being selected

if you don't have column representing the THREAD information in your table, use:
 as THREAD

If you have a column representing thread information, but isn't named THREAD, 
use:
myThreadColumnName as THREAD


Hope that clarifies.

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: Rally, Varun [mailto:[EMAIL PROTECTED]
Sent: Thu 7/3/2008 1:09 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver
 
Hello,

I believe I am doing all of the steps mentioned below. I think the issue
is with the configuration file where I have the SQL.

In CustomSQLDBReceiver, there is an example query

select logger as LOGGER, timestamp as TIMESTAMP, level as LEVEL, thread
as THREAD, message as MESSAGE, ndc as NDC, mdc as MDC, class as CLASS,
method as METHOD, file as FILE, line as LINE,
concat({{application,databaselogs,hostname,mymachine, log4jid,,
COUNTER,}}) as PROPERTIES,  as THROWABLE from logtable

I have 1 question in the above statement.
1) Do I need to have all the columns as part of table? Right now my
table structure is not having following columns
THREAD,NDC, MDC, FILE, LINE, PROPERTIES, THROWABLE (If these columns are
required, what should be their respective data types).

Regards,
Varun Rally
---
Fiserv, A-94/8, SECTOR 58 NOIDA UP INDIA 201301
Phone- 91-120-4023000  extn. 3268 Cell- 91-98990-37800
VOIP - 434-509-0698 Extn. 121
US Phone- 001-303-293-2223 Extn. 22814


-Original Message-
From: Scott Deboy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 1:51 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver

How to use CustomSQLDBReceiver:

1. create a $userhome/.chainsaw/plugins folder
2. copy your jdbc driver to the plugins folder
3. the Chainsaw downloads page links to an 'inportant distribution
notes' link for more info about extended features - go there and follow
the instructions for what you're trying to do (db extensions)
4. create a chainsaw xml config file containing a customsqldbreceiver
section
4a. make sure to follow the directions in the class javadoc for the
receiver for setting up the 'sql' param (read: all fields must be
aliased!!)
5. change Chainsaw's 'automatic configuration url' to the URL of the
chainsaw xml config file (view-show application wide preferences menu)
7. you may need to check the 'ok to remove security manager' checkbox as
well (on the same prefs screen)
8. restart Chainsaw

You should have a receiver defined in the receivers panel.  If you
don't, you haven't got the URL entered correctly in the application-wide
prefs screen, or the chainsaw XML config isn't defining the receiver
configuration correctly (see an example of a receiver config on the
Welcome tab's 'view example receiver configuration' button).  If you
can't figure this out, turn on your java console, pre-configuration
Chainsaw logging goes there.

If you don't get a new tab containing your db's events, examine
Chainsaw's own logging in the chainsaw-log tab - it should explain what
the problem is.

If you still have problems, feel free to email the list.


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: Rally, Varun [mailto:[EMAIL PROTECTED]
Sent: Thu 7/3/2008 12:44 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver
 
I created a table with the following statement.

 

1) CREATE TABLE  `userdb`.`sys_log` (

 

  `log_id` int(10) unsigned NOT NULL auto_increment,

 

  `log_date` timestamp NOT NULL default CURRENT_TIMESTAMP,

 

  `sys_name` varchar(45) NOT NULL,

 

  `machine_name` varchar(45) NOT NULL,

 

  `class_name` varchar(45) NOT NULL,

 

  `priority` varchar(45) NOT NULL,

 

  `message` varchar(45) default NULL,

 

  `extended_message` varchar(45) default NULL,

 

  `user_id` int(10) unsigned NOT NULL,

 

  `method_name` varchar(45) NOT NULL,

 

  PRIMARY KEY  (`log_id`)

 

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

 

 

My config file is like this...

 

2) ?xml version=1.0 encoding=UTF-8 ?

 

!DOCTYPE log4j:configuration 

 

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;

debug=true

 

   appender name=A2 class

RE: Question for CustomSQLDBReceiver

2008-07-03 Thread Rally, Varun
Thanks a ton Scott, it worked. The problem was that few columns were
missing in the SQL statement, everything else was fine.

Regards,
Varun Rally
---
Fiserv, A-94/8, SECTOR 58 NOIDA UP INDIA 201301
Phone- 91-120-4023000  extn. 3268 Cell- 91-98990-37800
VOIP - 434-509-0698 Extn. 121
US Phone- 001-303-293-2223 Extn. 22814


-Original Message-
From: Scott Deboy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 2:45 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver

The receiver needs all of the columns to be in the result set that it's
creating events from.  You DO NOT need to have all of the columns in
your schema - you just need to make sure the resultset being built
contains the columns. 

You do this by using aliases to rename or add missing columns, and
specifying default values if the column is missing

Examples:

If you have a column named THREAD, just include THREAD as one of the
columns being selected

if you don't have column representing the THREAD information in your
table, use:
 as THREAD

If you have a column representing thread information, but isn't named
THREAD, use:
myThreadColumnName as THREAD


Hope that clarifies.

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: Rally, Varun [mailto:[EMAIL PROTECTED]
Sent: Thu 7/3/2008 1:09 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver
 
Hello,

I believe I am doing all of the steps mentioned below. I think the issue
is with the configuration file where I have the SQL.

In CustomSQLDBReceiver, there is an example query

select logger as LOGGER, timestamp as TIMESTAMP, level as LEVEL, thread
as THREAD, message as MESSAGE, ndc as NDC, mdc as MDC, class as CLASS,
method as METHOD, file as FILE, line as LINE,
concat({{application,databaselogs,hostname,mymachine, log4jid,,
COUNTER,}}) as PROPERTIES,  as THROWABLE from logtable

I have 1 question in the above statement.
1) Do I need to have all the columns as part of table? Right now my
table structure is not having following columns
THREAD,NDC, MDC, FILE, LINE, PROPERTIES, THROWABLE (If these columns are
required, what should be their respective data types).

Regards,
Varun Rally
---
Fiserv, A-94/8, SECTOR 58 NOIDA UP INDIA 201301
Phone- 91-120-4023000  extn. 3268 Cell- 91-98990-37800
VOIP - 434-509-0698 Extn. 121
US Phone- 001-303-293-2223 Extn. 22814


-Original Message-
From: Scott Deboy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 1:51 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver

How to use CustomSQLDBReceiver:

1. create a $userhome/.chainsaw/plugins folder
2. copy your jdbc driver to the plugins folder
3. the Chainsaw downloads page links to an 'inportant distribution
notes' link for more info about extended features - go there and follow
the instructions for what you're trying to do (db extensions)
4. create a chainsaw xml config file containing a customsqldbreceiver
section
4a. make sure to follow the directions in the class javadoc for the
receiver for setting up the 'sql' param (read: all fields must be
aliased!!)
5. change Chainsaw's 'automatic configuration url' to the URL of the
chainsaw xml config file (view-show application wide preferences menu)
7. you may need to check the 'ok to remove security manager' checkbox as
well (on the same prefs screen)
8. restart Chainsaw

You should have a receiver defined in the receivers panel.  If you
don't, you haven't got the URL entered correctly in the application-wide
prefs screen, or the chainsaw XML config isn't defining the receiver
configuration correctly (see an example of a receiver config on the
Welcome tab's 'view example receiver configuration' button).  If you
can't figure this out, turn on your java console, pre-configuration
Chainsaw logging goes there.

If you don't get a new tab containing your db's events, examine
Chainsaw's own logging in the chainsaw-log tab - it should explain what
the problem is.

If you still have problems, feel free to email the list.


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: Rally, Varun [mailto:[EMAIL PROTECTED]
Sent: Thu 7/3/2008 12:44 PM
To: Log4J Users List
Subject: RE: Question for CustomSQLDBReceiver
 
I created a table with the following statement.

 

1) CREATE TABLE  `userdb`.`sys_log` (

 

  `log_id` int(10) unsigned NOT NULL auto_increment,

 

  `log_date` timestamp NOT NULL default CURRENT_TIMESTAMP,

 

  `sys_name` varchar(45) NOT NULL,

 

  `machine_name` varchar(45) NOT NULL,

 

  `class_name

Re: Question about Log4J and its future...

2007-12-11 Thread Maarten Bosteels
Also note that some people think that the future of log4j is logback:
http://logback.qos.ch/

I am not yet using it in production myself, but I will definitely
check it out in the near future..
(unfortunately it's using LGPL instead of Apache license)

regards
Maarten

On Dec 10, 2007 11:52 PM, Gary Gregory [EMAIL PROTECTED] wrote:
 The log4j release history is available here:
 http://logging.apache.org/log4j/1.2/changes-report.html

 Gary Gregory
 Seagull Software
 www.seagullsoftware.com


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 10, 2007 2:28 PM
  To: log4j-user@logging.apache.org
  Subject: Question about Log4J and its future...
 
  Hi,
 
  I have been looking at using log4j for my project I am impressed with the
  features that log4j provides me. However I have some questions:
 
  1. What is the roadmap of log4j, I see that there is an experimental
  version 2.0 in the works when is this going to be available. Also when was
  1.2.15 version released.
 
  Thanks
  Srikanth

 -
 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]



RE: Question about Log4J and its future...

2007-12-10 Thread Gary Gregory
The log4j release history is available here:
http://logging.apache.org/log4j/1.2/changes-report.html

Gary Gregory
Seagull Software
www.seagullsoftware.com

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Monday, December 10, 2007 2:28 PM
 To: log4j-user@logging.apache.org
 Subject: Question about Log4J and its future...

 Hi,

 I have been looking at using log4j for my project I am impressed with the
 features that log4j provides me. However I have some questions:

 1. What is the roadmap of log4j, I see that there is an experimental
 version 2.0 in the works when is this going to be available. Also when was
 1.2.15 version released.

 Thanks
 Srikanth

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



Re: Question: Chainsaw usage

2007-10-24 Thread Owe Andresen

Hello,
thanks alot, Paul, this was very helpful!

Where can i enter Bugs about Chainsaw? I see, there is no Chainsaw in 
http://issues.apache.org/bugzilla/enter_bug.cgi:(


This userlist is maybe the wrong place to paste problems with Chainsaw.


Anyway, in about 33% of the cases when i start Chainsaw (in Debug-mode from 
Eclipse), i get this error (first come come log entry, then an exception):




Using font=Arial

LOG4J-INTERNAL: 2007-10-24 18:04:03,289 DEBUG [main] 
org.apache.log4j.joran.action.ConfigurationAction#begin:42)- Starting 
internal logs on console.


LOG4J-INTERNAL: 2007-10-24 18:04:03,305 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:45)- About to instantiate 
plugin of type [mymain.UDPReceiver]


LOG4J-INTERNAL: 2007-10-24 18:04:03,399 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:59)- plugin named as 
[MyUDPReceiver]


LOG4J-INTERNAL: 2007-10-24 18:04:03,399 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:70)- Pushing plugin on to 
the object stack.


LOG4J-INTERNAL: 2007-10-24 18:04:03,399 DEBUG [main] 
org.apache.log4j.joran.action.ParamAction#begin:61)- In ParamAction setting 
parameter [Port] to value [514].


LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#end:102)- Popping plugin named 
[MyUDPReceiver] from the object stack


LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:45)- About to instantiate 
plugin of type [mymain.LogFilePatternReceiver]


LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:59)- plugin named as 
[MyLogFilePatternReceiver]


LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:70)- Pushing plugin on to 
the object stack.


LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#end:102)- Popping plugin named 
[MyLogFilePatternReceiver] from the object stack


LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.RootLoggerAction#begin:43)- Pushing root 
logger on stack


LOG4J-INTERNAL: 2007-10-24 18:04:03,446 DEBUG [main] 
org.apache.log4j.joran.action.LevelAction#begin:45)- Encapsulating logger 
name is [root], levelvalue is [trace].


LOG4J-INTERNAL: 2007-10-24 18:04:03,446 DEBUG [main] 
org.apache.log4j.joran.action.LevelAction#begin:76)- root level set to TRACE


LOG4J-INTERNAL: 2007-10-24 18:04:03,446 DEBUG [main] 
org.apache.log4j.joran.action.RootLoggerAction#end:61)- Removing root logger 
from top of stack.


LOG4J-INTERNAL: 2007-10-24 18:04:03,446 DEBUG [main] 
org.apache.log4j.joran.action.ConfigurationAction#end:49)- Will stop writing 
internal logs on console.


Wanting to add a row, but GUI not initialized, waiting...

Exception in thread AWT-EventQueue-0 
java.lang.ArrayIndexOutOfBoundsException: 3


at 
javax.swing.plaf.basic.BasicTabbedPaneUI.tabForCoordinate(BasicTabbedPaneUI.java:1286)


at 
javax.swing.plaf.basic.BasicTabbedPaneUI.setRolloverTab(BasicTabbedPaneUI.java:499)


at 
javax.swing.plaf.basic.BasicTabbedPaneUI.access$1200(BasicTabbedPaneUI.java:37)


at 
javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mouseMoved(BasicTabbedPaneUI.java:3254)


at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:271)

at java.awt.Component.processMouseMotionEvent(Component.java:5546)

at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3153)

at java.awt.Component.processEvent(Component.java:5270)

at java.awt.Container.processEvent(Container.java:1966)

at java.awt.Component.dispatchEventImpl(Component.java:3968)

at java.awt.Container.dispatchEventImpl(Container.java:2024)

at java.awt.Component.dispatchEvent(Component.java:3803)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3905)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)

at java.awt.Container.dispatchEventImpl(Container.java:2010)

at java.awt.Window.dispatchEventImpl(Window.java:1778)

at java.awt.Component.dispatchEvent(Component.java:3803)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)

at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)


at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)


at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)












- Original Message - 
From: Paul Smith [EMAIL PROTECTED]

To: Log4J Users List log4j-user@logging.apache.org
Sent: Tuesday, October 23, 2007 2:20 AM
Subject: Re: Question: Chainsaw usage




On 20/10/2007, at 7:51 PM, Owe Andresen wrote:


Hello,
(@first, im new to this list).

1. I write a sutom receiver for our

RE: Question: Chainsaw usage

2007-10-24 Thread Scott Deboy
You can enter Chainsaw bugs by entering the bug against log4j and
choosing the Chainsaw subcategory on the issue creation page.

Chainsaw supports per-tab settings, which are stored in
$userhome/.chainsaw (/documents and settings/username/.chainsaw on
Windows) - and I think you've got a problem with one of those files.

Try exiting Chainsaw  deleting all files out of that directory except
for chainsaw.settings.properties and chainsaw.settings.xml.


Scott Deboy


-Original Message-
From: Owe Andresen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 24, 2007 9:10 AM
To: Log4J Users List
Subject: Re: Question: Chainsaw usage

Hello,
thanks alot, Paul, this was very helpful!

Where can i enter Bugs about Chainsaw? I see, there is no Chainsaw in 
http://issues.apache.org/bugzilla/enter_bug.cgi:(

This userlist is maybe the wrong place to paste problems with Chainsaw.


Anyway, in about 33% of the cases when i start Chainsaw (in Debug-mode
from 
Eclipse), i get this error (first come come log entry, then an
exception):



Using font=Arial

LOG4J-INTERNAL: 2007-10-24 18:04:03,289 DEBUG [main] 
org.apache.log4j.joran.action.ConfigurationAction#begin:42)- Starting 
internal logs on console.

LOG4J-INTERNAL: 2007-10-24 18:04:03,305 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:45)- About to
instantiate 
plugin of type [mymain.UDPReceiver]

LOG4J-INTERNAL: 2007-10-24 18:04:03,399 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:59)- plugin named as 
[MyUDPReceiver]

LOG4J-INTERNAL: 2007-10-24 18:04:03,399 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:70)- Pushing plugin on
to 
the object stack.

LOG4J-INTERNAL: 2007-10-24 18:04:03,399 DEBUG [main] 
org.apache.log4j.joran.action.ParamAction#begin:61)- In ParamAction
setting 
parameter [Port] to value [514].

LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#end:102)- Popping plugin
named 
[MyUDPReceiver] from the object stack

LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:45)- About to
instantiate 
plugin of type [mymain.LogFilePatternReceiver]

LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:59)- plugin named as 
[MyLogFilePatternReceiver]

LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#begin:70)- Pushing plugin on
to 
the object stack.

LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.PluginAction#end:102)- Popping plugin
named 
[MyLogFilePatternReceiver] from the object stack

LOG4J-INTERNAL: 2007-10-24 18:04:03,430 DEBUG [main] 
org.apache.log4j.joran.action.RootLoggerAction#begin:43)- Pushing root 
logger on stack

LOG4J-INTERNAL: 2007-10-24 18:04:03,446 DEBUG [main] 
org.apache.log4j.joran.action.LevelAction#begin:45)- Encapsulating
logger 
name is [root], levelvalue is [trace].

LOG4J-INTERNAL: 2007-10-24 18:04:03,446 DEBUG [main] 
org.apache.log4j.joran.action.LevelAction#begin:76)- root level set to
TRACE

LOG4J-INTERNAL: 2007-10-24 18:04:03,446 DEBUG [main] 
org.apache.log4j.joran.action.RootLoggerAction#end:61)- Removing root
logger 
from top of stack.

LOG4J-INTERNAL: 2007-10-24 18:04:03,446 DEBUG [main] 
org.apache.log4j.joran.action.ConfigurationAction#end:49)- Will stop
writing 
internal logs on console.

Wanting to add a row, but GUI not initialized, waiting...

Exception in thread AWT-EventQueue-0 
java.lang.ArrayIndexOutOfBoundsException: 3

at 
javax.swing.plaf.basic.BasicTabbedPaneUI.tabForCoordinate(BasicTabbedPan
eUI.java:1286)

at 
javax.swing.plaf.basic.BasicTabbedPaneUI.setRolloverTab(BasicTabbedPaneU
I.java:499)

at 
javax.swing.plaf.basic.BasicTabbedPaneUI.access$1200(BasicTabbedPaneUI.j
ava:37)

at 
javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mouseMoved(BasicTabbedP
aneUI.java:3254)

at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:271)

at java.awt.Component.processMouseMotionEvent(Component.java:5546)

at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3153)

at java.awt.Component.processEvent(Component.java:5270)

at java.awt.Container.processEvent(Container.java:1966)

at java.awt.Component.dispatchEventImpl(Component.java:3968)

at java.awt.Container.dispatchEventImpl(Container.java:2024)

at java.awt.Component.dispatchEvent(Component.java:3803)

at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3905)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)

at java.awt.Container.dispatchEventImpl(Container.java:2010)

at java.awt.Window.dispatchEventImpl(Window.java:1778)

at java.awt.Component.dispatchEvent(Component.java:3803)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)

at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d.java:242

Re: Question: Chainsaw usage

2007-10-22 Thread Paul Smith


On 20/10/2007, at 7:51 PM, Owe Andresen wrote:


Hello,
(@first, im new to this list).

1. I write a sutom receiver for our log-message formats. What  
bothers me is that i have to open the recevers configuration file  
each time when i start Chainsaw.




Why don't you configure the URL of the config file in the  
preferences?  Then it will be loaded each time automatically?


2. I restart Chainsaw alot, becase i cannot remove the visible  
receivers once they are in the treeview of the chainsaw lgomessage  
panel.



I don't understand what you mean here.

3. I got concurrent modification exception, when having alot of  
messages (15).. Also i got IllegalArgumentException when  
filtering by date (with only 7000 logmessages also). known?


A stacktrace to this mailing list would be useful here, otherwise we  
don't know what problem you are encountering.


4. I am missing that jump-to-logmessage by number, i heard it was  
announced somewhere. When will this feature come in a new Chainsaw  
release?


This is in the trunk version of Chainsaw, not yet released (waiting  
on some downstream log4j modules to be released first).


cheers,

Paul

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



Re: Question: Chainsaw usage

2007-10-22 Thread stevenmmatic
All,

I have been lurking for a short while and I have to say, good job!

Your response times are fantastic!

Steve
Sent from my BlackBerry device on the Rogers Wireless Network

-Original Message-
From: Paul Smith [EMAIL PROTECTED]

Date: Tue, 23 Oct 2007 10:20:14 
To:Log4J Users List log4j-user@logging.apache.org
Subject: Re: Question: Chainsaw usage



On 20/10/2007, at 7:51 PM, Owe Andresen wrote:

 Hello,
 (@first, im new to this list).

 1. I write a sutom receiver for our log-message formats. What  
 bothers me is that i have to open the recevers configuration file  
 each time when i start Chainsaw.


Why don't you configure the URL of the config file in the  
preferences?  Then it will be loaded each time automatically?

 2. I restart Chainsaw alot, becase i cannot remove the visible  
 receivers once they are in the treeview of the chainsaw lgomessage  
 panel.

I don't understand what you mean here.

 3. I got concurrent modification exception, when having alot of  
 messages (15).. Also i got IllegalArgumentException when  
 filtering by date (with only 7000 logmessages also). known?

A stacktrace to this mailing list would be useful here, otherwise we  
don't know what problem you are encountering.

 4. I am missing that jump-to-logmessage by number, i heard it was  
 announced somewhere. When will this feature come in a new Chainsaw  
 release?

This is in the trunk version of Chainsaw, not yet released (waiting  
on some downstream log4j modules to be released first).

cheers,

Paul

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



Re: Question: Does Chainsaw read non XML logs?

2007-09-21 Thread Wim Deblauwe
If you want an easier way to read plain text files, check out Vigilog. The
new version (that will be released soon) is avaible as webstart at
http://vigilog.sourceforge.net/staging/. There is no need to convert you
conversionPattern like in Chainsaw.

regards,

Wim

2007/9/18, Siegel, Bernard J. [EMAIL PROTECTED]:

 Folks,
 This from the Chainsaw site:
 Chainsaw can read log files formatted in Log4j's XMLLayout, receive
 events from remote locations, read events from a DB, it can even work
 with the JDK 1.4 logging events.
 A co-worker asserted Chainsaw only works with XML formatted logs.
 Is this correct?
 Can it read logs written by Log4j in plain text format?
 Thank you,

 Bernard Siegel

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




-- 
Vigilog - an open source log file viewer: http://vigilog.sourceforge.net
Blog: http://www.jroller.com/page/Fester


Re: Question: Does Chainsaw read non XML logs?

2007-09-18 Thread Paul Smith
Sure it can, you just need to setup a LogFilePatternReceiver and  
provide it with the pattern of you logging file:


http://logging.apache.org/log4j/companions/receivers/xref/org/apache/ 
log4j/varia/LogFilePatternReceiver.html


Paul
On 19/09/2007, at 7:42 AM, Siegel, Bernard J. wrote:


Folks,
This from the Chainsaw site:
Chainsaw can read log files formatted in Log4j's XMLLayout, receive
events from remote locations, read events from a DB, it can even work
with the JDK 1.4 logging events.
A co-worker asserted Chainsaw only works with XML formatted logs.
Is this correct?
Can it read logs written by Log4j in plain text format?
Thank you,

Bernard Siegel

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



Paul Smith
Core Engineering Manager

Aconex
The easy way to save time and money on your project

696 Bourke Street, Melbourne,
VIC 3000, Australia
Tel: +61 3 9240 0200  Fax: +61 3 9240 0299
Email: [EMAIL PROTECTED]  www.aconex.com

This email and any attachments are intended solely for the addressee.  
The contents may be privileged, confidential and/or subject to  
copyright or other applicable law. No confidentiality or privilege is  
lost by an erroneous transmission. If you have received this e-mail  
in error, please let us know by reply e-mail and delete or destroy  
this mail and all copies. If you are not the intended recipient of  
this message you must not disseminate, copy or take any action in  
reliance on it. The sender takes no responsibility for the effect of  
this message upon the recipient's computer system.






Re: Question about logging to multiple files

2007-08-23 Thread James A. N. Stauffer
You probably don't want to put the A2 appender in the root section.
Also if you set additivity=false in the com.test.me.my.Test
catagory/logger then the message won't go to the A1 appender.

On 8/23/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:
 Hi
 I am using XML to define my logging properties,
 I wanted to know if i can define 2 log files, and have logs in them
 depending on which class is writing log file
 for example

 if the package is
 com.test.me then the logs should be written to mylog.xml file

 if the class is
 com.test.me.my.Test then the logs should be written to mytest.log file.

 Here is my XML file

 appender name=A1 class=org.apache.log4j.DailyRollingFileAppender 
 param name=File value=C:\\mylog.xml /
 param name=DatePattern value='.'-MM-dd /

 layout class=org.apache.log4j.xml.XMLLayout
 /layout
 /appender

 appender name=A2 class=org.apache.log4j.DailyRollingFileAppender 
 param name=File value=c:\\ mytest.log /
 param name=DatePattern value='.'-MM-dd /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) - %m%n /
 /layout
 /appender

 category name=com.test.me
 priority value=debug /

 appender-ref ref=A1 /
 /category


 category name=com.test.me.my.Test
 priority value=debug /

 appender-ref ref=A2 /
 /category


 root

 appender-ref ref=A1 /
 appender-ref ref=A2 /

 /root



-- 
James A. N. Staufferhttp://www.geocities.com/stauffer_james/
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]



Re: Question about logging to multiple files

2007-08-23 Thread Curt Arnold


On Aug 23, 2007, at 3:24 PM, Ashish Kulkarni wrote:


Hi
I am using XML to define my logging properties,
I wanted to know if i can define 2 log files, and have logs in them
depending on which class is writing log file
for example

if the package is
com.test.me then the logs should be written to mylog.xml file

if the class is
com.test.me.my.Test then the logs should be written to mytest.log  
file.


Here is my XML file




+ log4j:configuration threshold=debug

appender name=A1  
class=org.apache.log4j.DailyRollingFileAppender 

param name=File value=C:\\mylog.xml /
param name=DatePattern value='.'-MM-dd /

layout class=org.apache.log4j.xml.XMLLayout
/layout
/appender

appender name=A2  
class=org.apache.log4j.DailyRollingFileAppender 

param name=File value=c:\\ mytest.log /
param name=DatePattern value='.'-MM-dd /
layout class=org.apache.log4j.PatternLayout
param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) -  
%m%n /

/layout
/appender



Replace this section:


category name=com.test.me
priority value=debug /

appender-ref ref=A1 /
/category


category name=com.test.me.my.Test
priority value=debug /

appender-ref ref=A2 /
/category


root

appender-ref ref=A1 /
appender-ref ref=A2 /

/root


with:

!--  all requests from com.test.me.my.Test or descendents go to A2  
and do not propagate to root  --

logger name=com.test.me.my.Test additivity=false
appender-ref ref=A2/
/logger

!--  any requests except those from com.test.me go to A1  --
root
   level value=debug/
   appender-ref ref=A1/
/root

/log4j:configuration


Your configuration would have routed messages from com.test.me to  
A1 twice and once to A2.  Messages from com.test.me.my.Test would  
have gone to A1 twice and A2 twice.


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



Re: Question about logging to multiple files

2007-08-23 Thread Ashish Kulkarni
Hi
Work perfect, thank you

On 8/23/07, James A. N. Stauffer [EMAIL PROTECTED] wrote:

 You probably don't want to put the A2 appender in the root section.
 Also if you set additivity=false in the com.test.me.my.Test
 catagory/logger then the message won't go to the A1 appender.

 On 8/23/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:
  Hi
  I am using XML to define my logging properties,
  I wanted to know if i can define 2 log files, and have logs in them
  depending on which class is writing log file
  for example
 
  if the package is
  com.test.me then the logs should be written to mylog.xml file
 
  if the class is
  com.test.me.my.Test then the logs should be written to mytest.log file.
 
  Here is my XML file
 
  appender name=A1 class=org.apache.log4j.DailyRollingFileAppender 
  param name=File value=C:\\mylog.xml /
  param name=DatePattern value='.'-MM-dd /
 
  layout class=org.apache.log4j.xml.XMLLayout
  /layout
  /appender
 
  appender name=A2 class=org.apache.log4j.DailyRollingFileAppender 
  param name=File value=c:\\ mytest.log /
  param name=DatePattern value='.'-MM-dd /
  layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) -
 %m%n /
  /layout
  /appender
 
  category name=com.test.me
  priority value=debug /
 
  appender-ref ref=A1 /
  /category
 
 
  category name=com.test.me.my.Test
  priority value=debug /
 
  appender-ref ref=A2 /
  /category
 
 
  root
 
  appender-ref ref=A1 /
  appender-ref ref=A2 /
 
  /root
 


 --
 James A. N. Staufferhttp://www.geocities.com/stauffer_james/
 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]




Re: Question about logging to multiple files

2007-08-23 Thread Ashish Kulkarni
Hi
This works fine, can i do the same if i am using properties file instead of
XML file for defining configuration
some thing like

log4j.rootLogger= A1

log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d %-5p [%t] %-17c{2} (%13F:%L)
%3x - %m%n
log4j.appender.A1.com.test.me=DEBUG


log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A2.File=${java.io.tmpdir}approvals6000F3.txt
log4j.appender.A2.Append=false
log4j.appender.A2.DatePattern='.'-MM-dd
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%-5r %-5p [%t] %c{2} - %m%n
log4j.appender.A2.com.test.me.my.Test=DEBUG

The way i have written in above properties file, will it work as expected?


Ashish



On 8/23/07, Curt Arnold [EMAIL PROTECTED] wrote:


 On Aug 23, 2007, at 3:24 PM, Ashish Kulkarni wrote:

  Hi
  I am using XML to define my logging properties,
  I wanted to know if i can define 2 log files, and have logs in them
  depending on which class is writing log file
  for example
 
  if the package is
  com.test.me then the logs should be written to mylog.xml file
 
  if the class is
  com.test.me.my.Test then the logs should be written to mytest.log
  file.
 
  Here is my XML file
 


 + log4j:configuration threshold=debug

  appender name=A1
  class=org.apache.log4j.DailyRollingFileAppender 
  param name=File value=C:\\mylog.xml /
  param name=DatePattern value='.'-MM-dd /
 
  layout class=org.apache.log4j.xml.XMLLayout
  /layout
  /appender
 
  appender name=A2
  class=org.apache.log4j.DailyRollingFileAppender 
  param name=File value=c:\\ mytest.log /
  param name=DatePattern value='.'-MM-dd /
  layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) -
  %m%n /
  /layout
  /appender
 

 Replace this section:

  category name=com.test.me
  priority value=debug /
 
  appender-ref ref=A1 /
  /category
 
 
  category name=com.test.me.my.Test
  priority value=debug /
 
  appender-ref ref=A2 /
  /category
 
 
  root
 
  appender-ref ref=A1 /
  appender-ref ref=A2 /
 
  /root

 with:

 !--  all requests from com.test.me.my.Test or descendents go to A2
 and do not propagate to root  --
 logger name=com.test.me.my.Test additivity=false
  appender-ref ref=A2/
 /logger

 !--  any requests except those from com.test.me go to A1  --
 root
 level value=debug/
 appender-ref ref=A1/
 /root

 /log4j:configuration


 Your configuration would have routed messages from com.test.me to
 A1 twice and once to A2.  Messages from com.test.me.my.Test would
 have gone to A1 twice and A2 twice.

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




Re: Question about logging to multiple files

2007-08-23 Thread James A. N. Stauffer
You still need to set additivity.  I *think* it is:
log4j.additivity.com.test.me.my.Test=false

Also I think you may be defining you loggers incorrectly but I'm not sure.

On 8/23/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:
 Hi
 This works fine, can i do the same if i am using properties file instead of
 XML file for defining configuration
 some thing like

 log4j.rootLogger= A1

 log4j.appender.A1=org.apache.log4j.ConsoleAppender
 # A1 uses PatternLayout.
 log4j.appender.A1.layout=org.apache.log4j.PatternLayout
 log4j.appender.A1.layout.ConversionPattern=%d %-5p [%t] %-17c{2} (%13F:%L)
 %3x - %m%n
 log4j.appender.A1.com.test.me=DEBUG


 log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.A2.File=${java.io.tmpdir}approvals6000F3.txt
 log4j.appender.A2.Append=false
 log4j.appender.A2.DatePattern='.'-MM-dd
 log4j.appender.A2.layout=org.apache.log4j.PatternLayout
 log4j.appender.A2.layout.ConversionPattern=%-5r %-5p [%t] %c{2} - %m%n
 log4j.appender.A2.com.test.me.my.Test=DEBUG

 The way i have written in above properties file, will it work as expected?


 Ashish



 On 8/23/07, Curt Arnold [EMAIL PROTECTED] wrote:
 
 
  On Aug 23, 2007, at 3:24 PM, Ashish Kulkarni wrote:
 
   Hi
   I am using XML to define my logging properties,
   I wanted to know if i can define 2 log files, and have logs in them
   depending on which class is writing log file
   for example
  
   if the package is
   com.test.me then the logs should be written to mylog.xml file
  
   if the class is
   com.test.me.my.Test then the logs should be written to mytest.log
   file.
  
   Here is my XML file
  
 
 
  + log4j:configuration threshold=debug
 
   appender name=A1
   class=org.apache.log4j.DailyRollingFileAppender 
   param name=File value=C:\\mylog.xml /
   param name=DatePattern value='.'-MM-dd /
  
   layout class=org.apache.log4j.xml.XMLLayout
   /layout
   /appender
  
   appender name=A2
   class=org.apache.log4j.DailyRollingFileAppender 
   param name=File value=c:\\ mytest.log /
   param name=DatePattern value='.'-MM-dd /
   layout class=org.apache.log4j.PatternLayout
   param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) -
   %m%n /
   /layout
   /appender
  
 
  Replace this section:
 
   category name=com.test.me
   priority value=debug /
  
   appender-ref ref=A1 /
   /category
  
  
   category name=com.test.me.my.Test
   priority value=debug /
  
   appender-ref ref=A2 /
   /category
  
  
   root
  
   appender-ref ref=A1 /
   appender-ref ref=A2 /
  
   /root
 
  with:
 
  !--  all requests from com.test.me.my.Test or descendents go to A2
  and do not propagate to root  --
  logger name=com.test.me.my.Test additivity=false
   appender-ref ref=A2/
  /logger
 
  !--  any requests except those from com.test.me go to A1  --
  root
  level value=debug/
  appender-ref ref=A1/
  /root
 
  /log4j:configuration
 
 
  Your configuration would have routed messages from com.test.me to
  A1 twice and once to A2.  Messages from com.test.me.my.Test would
  have gone to A1 twice and A2 twice.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-- 
James A. N. Staufferhttp://www.geocities.com/stauffer_james/
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]



Re: question mark displayed for certain patterns

2007-02-01 Thread Eqbal
Okay. It was a compile issue as I was using ant and
compiling with no debug flag so it defaulted to off.
The issue is resolved, thanks for your help.
--- Curt Arnold [EMAIL PROTECTED] wrote:

 
 On Jan 29, 2007, at 5:08 PM, Eqbal wrote:
 
  Hi,
 
  I am fairly new to log4j. I am experiencing a
 problem
  when configuring log4j in Tomcat and use it
 through
  commons logging framework. I get a ? (question
 mark)
  in place of %F and %L patterns. When I run a Java
  class file as a standalone using main, I get the
  proper file name and line number. But when I run
 the
  web application I get a question mark in the
 console.
  Anyone can tell me what I am doing wrong?
 
  Thanks.
 
 
 That behavior is expected when the calling class is
 compiled without  
 debug information (like using javac -g:none). 
 Commons logging may  
 complicate issues since it would be responsible to
 pass a fully  
 qualified category (aka logger) name to log4j
 otherwise all logging  
 requests will appear to originate from just a few
 lines in commons  
 logging.  I'd expect that the problem is likely a
 compilation  
 problem, a commons logging problem, or a tomcat
 problem in that order  
 and unlikely to be a log4j problem.
 
 If that doesn't resolve the problem, I would suggest
 asking on the  
 Tomcat list and specifying what platform and the
 versions of JDK,  
 Tomcat, Commons Logging, and log4j are in use.
 
 
 
 
 

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



 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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



Re: question mark displayed for certain patterns

2007-01-29 Thread Curt Arnold


On Jan 29, 2007, at 5:08 PM, Eqbal wrote:


Hi,

I am fairly new to log4j. I am experiencing a problem
when configuring log4j in Tomcat and use it through
commons logging framework. I get a ? (question mark)
in place of %F and %L patterns. When I run a Java
class file as a standalone using main, I get the
proper file name and line number. But when I run the
web application I get a question mark in the console.
Anyone can tell me what I am doing wrong?

Thanks.



That behavior is expected when the calling class is compiled without  
debug information (like using javac -g:none).  Commons logging may  
complicate issues since it would be responsible to pass a fully  
qualified category (aka logger) name to log4j otherwise all logging  
requests will appear to originate from just a few lines in commons  
logging.  I'd expect that the problem is likely a compilation  
problem, a commons logging problem, or a tomcat problem in that order  
and unlikely to be a log4j problem.


If that doesn't resolve the problem, I would suggest asking on the  
Tomcat list and specifying what platform and the versions of JDK,  
Tomcat, Commons Logging, and log4j are in use.






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



Re: question on conversion character %c

2006-05-20 Thread V Jayakumar

On May 19, 2006, at 9:41 AM, V Jayakumar wrote:

In my pattern layout, if I use the conversion character %c, it  prints the 
value based on the category as expected:


Example :

com.abc.def.ghi - Message 1
com.abc.def.ghi - Message 2
com.abc.def - Message 3
com.abc.def - Message 4

My requirement is to see the log messages as

def.ghi - Message 1
def.ghi - Message 2
def - Message 3
def - Message 4

i.e. I do not want the first two components of the category name

Could someone explain how to achieve this, please ?

Thanks in advance for the help.




There are several means to abbreviate category names using the  
PatternLayout.  In log4j 1.2, you could:


%.7c - print just the rightmost 7 characters
%c{2} - print the rightmost two parts of the name

In log4j 1.3, additional abbreviation syntax was added:

%c{1.} - will abbreviate the non-final parts of the name, resulting  in 
c.a.d.ghi for example.
%c{1~.} - will abbreviate the non-final parts of the name and add a  tilde 
when characters were dropped, resulting in c~.a~.d~.ghi for  example.


From a code review of NameAbbreviator (http://svn.apache.org/repos/ 
asf/logging/log4j/trunk/src/java/org/apache/log4j/pattern/ 
NameAbbreviator.java),
 it looks like either: %c{0.0.*}  or %c{..*} would do what you  want.  The 
first two elements of the name would be output zero width  and all 
remaining fields would not be abbreviated.  However, I have  not tested 
that particular pattern.





Thank you for your reply. With log4j 1.3, both  %c{0.0.*}  and  %c{..*} 
worked.


In both the cases, output in the log looked like

..def.ghi - Message 1
..def.ghi - Message 2
..def - Message 3
..def - Message 4

I wonder, if there is a way to supress the .. before def* ?

Thanks again,
Jayakumar



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



Re: question on conversion character %c

2006-05-20 Thread Curt Arnold


On May 20, 2006, at 10:02 AM, V Jayakumar wrote:


I wonder, if there is a way to supress the .. before def* ?

Thanks again,
Jayakumar


I don't think so short of your writing a custom layout or pattern.  I  
don't see the use case being sufficiently general to try to support  
in log4j itself.


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



Re: question on conversion character %c

2006-05-19 Thread Curt Arnold


On May 19, 2006, at 9:41 AM, V Jayakumar wrote:

In my pattern layout, if I use the conversion character %c, it  
prints the value based on the category as expected:


Example :

com.abc.def.ghi - Message 1
com.abc.def.ghi - Message 2
com.abc.def - Message 3
com.abc.def - Message 4

My requirement is to see the log messages as

def.ghi - Message 1
def.ghi - Message 2
def - Message 3
def - Message 4

i.e. I do not want the first two components of the category name

Could someone explain how to achieve this, please ?

Thanks in advance for the help.




There are several means to abbreviate category names using the  
PatternLayout.  In log4j 1.2, you could:


%.7c - print just the rightmost 7 characters
%c{2} - print the rightmost two parts of the name

In log4j 1.3, additional abbreviation syntax was added:

%c{1.} - will abbreviate the non-final parts of the name, resulting  
in c.a.d.ghi for example.
%c{1~.} - will abbreviate the non-final parts of the name and add a  
tilde when characters were dropped, resulting in c~.a~.d~.ghi for  
example.


From a code review of NameAbbreviator (http://svn.apache.org/repos/ 
asf/logging/log4j/trunk/src/java/org/apache/log4j/pattern/ 
NameAbbreviator.java),
 it looks like either: %c{0.0.*}  or %c{..*} would do what you  
want.  The first two elements of the name would be output zero width  
and all remaining fields would not be abbreviated.  However, I have  
not tested that particular pattern.





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



RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo

2006-02-28 Thread Giancarlo V Martinez

Scott thank you so much for you help, you also helped me to think of alternatives to my current problem, which is always good.  Two real quick questions, one maybe not so quick.  You suggested we use logfilepatternreceiver because of the ability to have an event history, correct?  Also it is better than Socket, since socket could end up blocking correct?  Just trying to summarize from what you have provided me.

Second question might not be so quick.  How do you setup 'forwarding' of events?  Would I have to have log4j enabled on two servers? In the diagram would I have to have a log4j enabled program running on the Log Server in order for the incoming events to be forwarded to the chainsaw clients, or can appenders and receivers be configured to forward event on their own.

Thank you,
Giancarlo V. Martinez

11501 Burnet Rd 902-4, B-020
Austin TX, 78758
Office: (512)-838-9489; T/L 678-9489; Fax: (512)-823-0035
Scott Deboy [EMAIL PROTECTED]








Scott Deboy [EMAIL PROTECTED] 
02/27/2006 10:52 PM

Please respond to
Log4J Users List








To
Log4J Users List log4j-user@logging.apache.org


cc



Subject
RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo








Your network admin should be able to devise a plan to get you access to the logs without having to replicate them (nfs/ssh?).

Log4j's appenders and receivers -could- be used in a single log4j configuration file to 'forward' events from one environment to another (events received by any receiver will processed by any appender), but I don't think that's a great idea in your case, since the only receiver that could work is logfilepatternreceiver, and it doesn't handle file rollovers gracefully.

Good luck

Scott

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: Giancarlo V Martinez [mailto:[EMAIL PROTECTED]]
Sent: Mon 2/27/2006 4:15 PM
To: Log4J Users List
Subject: RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo
 





Scott,

You hit the nail on the head when you said, On the developer side, it
wouldn't matter where the event source is (database, log file, ssh,
network), as long as their client had network access to where the log is
stored. The problem I am having is since we are in such a secure
environment, the Client does not have network access to the event source.
We thought of a central log server, which has access to the app servers,
and which can be accessed by the clients. With the Log Server, we would
only have to create a connection from the log server to the App Servers,
through the firewall. The log files themselves would still reside locally
on the App Servers, we just wanted the Log Server to pass the logging from
the App Servers to the Clients.

Basically the question I still have is, is it possible to set up a
distributed environment for logging and have the logs reside locally on
the App Servers, and in a DB for the Stored Procedure logging? From what I
have read, I am unsure, hence the question. Would the alternative be for
the App Servers to log remotely to the Log Server, and all the logs would
reside on the Log Server? Then the clients would read the log files off of
the Log Server?


Thank you,
Giancarlo V. Martinez

11501 Burnet Rd 902-4, B-020
Austin TX, 78758
Office: (512)-838-9489; T/L 678-9489; Fax: (512)-823-0035


  
   Scott Deboy 
   [EMAIL PROTECTED]   
   stems.com To 
Log4J Users List 
   02/27/2006 04:57 log4j-user@logging.apache.org   
   PM cc 
  
  Subject 
   Please respond to RE: Question about having a 
Log4J Users  distributed log4j/Chainsaw 
  Listenvironment, receiver/appender   
combo
  
  
  
  
  
  




A few things:

1. You can configure Chainsaw to always load a configuration on startup
 View, show application wide preferences, configuration URL
2. The configuration URL can reference a remote web site or local
 For example: http://www.mycompany.com/chainsaw-config.xmlor
file:///c:/chainsaw-config.xml
3. This configuration file can include definitions for multiple receivers.
 See the example receiver configuration available from Chainsaw's Welcome
tab
4. You can change the configuration URL and restart Chainsaw and the new
configuration will be used

My point is that you can create any number

RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo

2006-02-28 Thread Scott Deboy
Yes, use LogFilePatternReceiver (or write all events to a database) to get 
history.

Yes, it's a good idea to avoid potentially blocking appenders/receivers in 
production.

If you create a Chainsaw config file that includes a receiver AND an appender, 
you'll notice that the appender will receive all of the events that are 
'received' by the receiver.  

This capability can be exploited to pull events from one environment to another 
(LogFilePatternReceiver  FileAppender used together would cause remote log 
files to be written locally).  Again, this has drawbacks because of rollover 
issues.


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: Giancarlo V Martinez [mailto:[EMAIL PROTECTED]
Sent: Tue 2/28/2006 7:16 AM
To: Log4J Users List
Cc: Log4J Users List
Subject: RE: Question about having a distributed log4j/Chainsaw environment, 
receiver/appender combo
 





Scott thank you so much for you help, you also helped me to think of
alternatives to my current problem, which is always good.  Two real quick
questions, one maybe not so quick.  You suggested we use
logfilepatternreceiver because of the ability to have an event history,
correct?  Also it is better than Socket, since socket could end up blocking
correct?  Just trying to summarize from what you have provided me.

Second question might not be so quick.  How do you setup 'forwarding' of
events?  Would I have to have log4j enabled on two servers? In the diagram
would I have to have a log4j enabled program running on the Log Server in
order for the incoming events to be forwarded to the chainsaw clients, or
can appenders and receivers be configured to forward event on their own.

Thank you,
Giancarlo V. Martinez

11501 Burnet Rd 902-4, B-020
Austin TX, 78758
Office: (512)-838-9489; T/L 678-9489; Fax: (512)-823-0035


   
 Scott Deboy 
 [EMAIL PROTECTED] 
 stems.com To 
   Log4J Users List  
 02/27/2006 10:52  log4j-user@logging.apache.org 
 PM cc 
   
   Subject 
 Please respond to RE: Question about having a 
   Log4J Usersdistributed log4j/Chainsaw  
   List   environment, receiver/appender  
   combo   
   
   
   
   
   
   




Your network admin should be able to devise a plan to get you access to the
logs without having to replicate them (nfs/ssh?).

Log4j's appenders and receivers -could- be used in a single log4j
configuration file to 'forward' events from one environment to another
(events received by any receiver will processed by any appender), but I
don't think that's a great idea in your case, since the only receiver that
could work is logfilepatternreceiver, and it doesn't handle file rollovers
gracefully.

Good luck

Scott

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: Giancarlo V Martinez [mailto:[EMAIL PROTECTED]
Sent: Mon 2/27/2006 4:15 PM
To: Log4J Users List
Subject: RE: Question about having a distributed log4j/Chainsaw
environment, receiver/appender combo






Scott,

You hit the nail on the head when you said, On the developer side, it
wouldn't matter where the event source is (database, log file, ssh,
network), as long as their client had network access to where the log is
stored.  The problem I am having is since we are in such a secure
environment, the Client does not have network access to the event source.
We thought of a central log server, which has access to the app servers,
and which can be accessed by the clients.  With the Log Server, we would
only have to create a connection from the log server to the App Servers,
through

RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo

2006-02-27 Thread Scott Deboy
Do you need event history? (events created prior to when you started Chainsaw)? 
 If so, that leaves out the socket-based appenders (at least in 1.2.x).

SocketHubAppender and SocketHubReceiver are not a bad way to go if you don't 
need event history, but I wouldn't use -blocking- network-based appenders in a 
server app.  Even wrapping them in AsyncAppender isn't sufficient to prevent 
possible blocking of the app server if Chainsaw is on a slow link (at least in 
log4j 1.2.x).

Assuming you're using log4j 1.2.x in the server environment, I'd use one of 
these combinations:
 - FileAppender and LogFilePatternReceiver or VFSLogFilePatternReceiver (if 
over ssh)
 - JMSAppender and custom code to write the events to a database and 
CustomSQLDBReceiver
 - JDBCAppender (http://www.dankomannhaupt.de/projects/) and CustomSQLDBReceiver

The Chainsaw config can be managed by IT and accessed via URL, so if you use 
log files, it doesn't matter where they are because everyone uses a single 
configuration file to access the logs (no real need for a centralized server to 
get the same effect).

When you can use log4j 1.3 in your environment on the appender-side, you could 
use:
 - DBAppender and DBReceiver (if you don't mind using log4j's schema for 
logging events)
 - An enhancement to SocketHubAppender that allows you to specify the number of 
events that are buffered - the buffered events are provided to new 
SocketHubReceiver clients
 - Two -nonblocking- network appenders and receivers: UDPAppender/Receiver and 
MulticastAppender/Receiver

Log files are probably the best way to go for now - and the latest version of 
VFSLogFilePatternReceiver will allow you to access logs accessible via ssh 
without you having to embed the username/password in the config file (the next 
update to Chainsaw will support a GUI login window for 
VFSLogFilePatternReceiver).

I hope this helps, feel free to ask more questions.

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: Giancarlo V Martinez [mailto:[EMAIL PROTECTED]
Sent: Mon 2/27/2006 7:43 AM
To: log4j-user@logging.apache.org
Subject: Question about having a distributed log4j/Chainsaw environment, 
receiver/appender combo
 





I have been asked by my company if it is possible to setup a distributed
environment for log4j and Chainsaw, in which all of our application servers
would be logging to one Log Server, and multiple Chainsaw clients would
connect to the Log Server.  That way any user can connect to a central
server and view the logging of all the application servers.

I did some research and I think I need to setup the following environment:
- A SocketAppender on each of the Application Servers
- A SocketReciever on the Log Server for each appender/receiver combo
- A SocketHubAppender on the Log Server so that multiple chainsaw clients
can connect
- A SocketHubReceiver for each of the Chainsaw clients.

I was wondering if this was even possible, to have logging messages routed
through a server with a SocketReceiver/SocketHubAppender Combination, and
if so how would I set this up?  I could I get the two interfaces to
communicate with each other?

Thank you,
Giancarlo V. Martinez


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

RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo

2006-02-27 Thread Giancarlo V Martinez
 chainsaw view these files, via ssh?  I don't think would work however due to our network constraints.

Thank you so much for your help,
Giancarlo V. Martinez

11501 Burnet Rd 902-4, B-020
Austin TX, 78758
Office: (512)-838-9489; T/L 678-9489; Fax: (512)-823-0035
Scott Deboy [EMAIL PROTECTED]








Scott Deboy [EMAIL PROTECTED] 
02/27/2006 10:49 AM

Please respond to
Log4J Users List








To
Log4J Users List log4j-user@logging.apache.org


cc



Subject
RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo








Do you need event history? (events created prior to when you started Chainsaw)? If so, that leaves out the socket-based appenders (at least in 1.2.x).

SocketHubAppender and SocketHubReceiver are not a bad way to go if you don't need event history, but I wouldn't use -blocking- network-based appenders in a server app. Even wrapping them in AsyncAppender isn't sufficient to prevent possible blocking of the app server if Chainsaw is on a slow link (at least in log4j 1.2.x).

Assuming you're using log4j 1.2.x in the server environment, I'd use one of these combinations:
 - FileAppender and LogFilePatternReceiver or VFSLogFilePatternReceiver (if over ssh)
 - JMSAppender and custom code to write the events to a database and CustomSQLDBReceiver
 - JDBCAppender (http://www.dankomannhaupt.de/projects/) and CustomSQLDBReceiver

The Chainsaw config can be managed by IT and accessed via URL, so if you use log files, it doesn't matter where they are because everyone uses a single configuration file to access the logs (no real need for a centralized server to get the same effect).

When you can use log4j 1.3 in your environment on the appender-side, you could use:
 - DBAppender and DBReceiver (if you don't mind using log4j's schema for logging events)
 - An enhancement to SocketHubAppender that allows you to specify the number of events that are buffered - the buffered events are provided to new SocketHubReceiver clients
 - Two -nonblocking- network appenders and receivers: UDPAppender/Receiver and MulticastAppender/Receiver

Log files are probably the best way to go for now - and the latest version of VFSLogFilePatternReceiver will allow you to access logs accessible via ssh without you having to embed the username/password in the config file (the next update to Chainsaw will support a GUI login window for VFSLogFilePatternReceiver).

I hope this helps, feel free to ask more questions.

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: Giancarlo V Martinez [mailto:[EMAIL PROTECTED]]
Sent: Mon 2/27/2006 7:43 AM
To: log4j-user@logging.apache.org
Subject: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo
 





I have been asked by my company if it is possible to setup a distributed
environment for log4j and Chainsaw, in which all of our application servers
would be logging to one Log Server, and multiple Chainsaw clients would
connect to the Log Server. That way any user can connect to a central
server and view the logging of all the application servers.

I did some research and I think I need to setup the following environment:
- A SocketAppender on each of the Application Servers
- A SocketReciever on the Log Server for each appender/receiver combo
- A SocketHubAppender on the Log Server so that multiple chainsaw clients
can connect
- A SocketHubReceiver for each of the Chainsaw clients.

I was wondering if this was even possible, to have logging messages routed
through a server with a SocketReceiver/SocketHubAppender Combination, and
if so how would I set this up? I could I get the two interfaces to
communicate with each other?

Thank you,
Giancarlo V. Martinez


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



RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo

2006-02-27 Thread Giancarlo V Martinez

Tried to clean up the picture.  This may not work since I think all extra spaces are bieing removed.
___
| WEBSPHERE   |
| APPLICATION |
| SERVER  |
---
  | 
  | 
  | 
  | ??? - Don't know what is the best type of Appender/Receiver?
  | 
  |
  |
 
| LOG SERVER |
--
  |\
  | \ 
  |??? - Don't know what is the best type of Appender/Receiver?
  |  \  
__\__ 
| Chainsaw | | Chainsaw | 
| client   | | client   | 
-

Thank you,
Giancarlo V. Martinez

11501 Burnet Rd 902-4, B-020
Austin TX, 78758
Office: (512)-838-9489; T/L 678-9489; Fax: (512)-823-0035
Giancarlo V Martinez/Austin/[EMAIL PROTECTED]








Giancarlo V Martinez/Austin/[EMAIL PROTECTED] 
02/27/2006 04:05 PM

Please respond to
Log4J Users List








To
Log4J Users List log4j-user@logging.apache.org


cc
Log4J Users List log4j-user@logging.apache.org


Subject
RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo








Scott thank you for your reply. I decided to use a picture to best describe what we are trying to do and why.


Basically we want our development team to be able to view the logging of any machine in our environment from a remote location, that is why we want to use Chainsaw. We also want to be able to view the logging of our Oracle Stored Procedures, which gets logged to the DB in the above image. Also, since Log4J 1.3 is still in alpha, the dev lead does not feel comfortable utilizing it, he would prefer we use 1.2.x.

We do not know which would be the best way to setup this kind of environment. What should we use for all the question marks (???), so that events can be viewed from any client, for any server. Saw your three choices but which one would be the best?

The reason why we came up with the above architecture is that, we are in a very secured area, with very strict firewall rules. To be able to connect to WAS, the network admin has to open op a port on each machine for each client which may connect to it. It would be impossible for us to know all the Chainsaw clients which may want to connect to WAS, so we thought a middle-man, the Log Server would be our best bet. We thought, as stated in my previous note, we could have an appender/receiver connection from WAS to the Log Server, this connection would also be active, so that would handle the issue of event history. 

Correct me if I am wrong, but if the connection is always active then no events should be lost, correct? What would be the best way for multiple Chainsaw Clients to view the events from multiple WebSphere Servers?

Second, the DBA does not want us to use log4j on the Logging DB. He does not want an instance of Java running on that machine. What would be the best way for Chainsaw clients to view the events of the Stored Procedures, could we also route those requests through the Log Server? I know Log4PLSQL is not in the domain of this forum, but if you could nudge us in the right direction it would be great.

For the record I am very new to log4J and chainsaw so some of your responses I could not follow. What did you mean by -blocking- network-based appenders? How can the App Server be blocked? 

Also I didn't understand this sentence, The Chainsaw config can be managed by IT and accessed via URL, so if you use log files, it doesn't matter where they are because everyone uses a single configuration file to access the logs, how would chainsaw view these files, via ssh? I don't think would work however due to our network constraints.

Thank you so much for your help,
Giancarlo V. Martinez

11501 Burnet Rd 902-4, B-020
Austin TX, 78758
Office: (512)-838-9489; T/L 678-9489; Fax: (512)-823-0035
Scott Deboy [EMAIL PROTECTED]











Scott Deboy [EMAIL PROTECTED]
02/27/2006 10:49 AM 









Please respond to
Log4J Users List



To
Log4J Users List log4j-user@logging.apache.org

cc

Subject
RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo








Do you need event history? (events created prior to when you started Chainsaw)? If so, that leaves out the socket-based appenders (at least in 1.2.x).

SocketHubAppender and SocketHubReceiver are not a bad way to go if you don't need event history, but I wouldn't use -blocking- network-based appenders in a server app. Even wrapping them in AsyncAppender isn't sufficient to prevent possible blocking of the app server if Chainsaw is on a slow link (at least in log4j 1.2.x).

Assuming you're using log4j 1.2.x in the server environment, I'd use one of these combinations:
- FileAppender and LogFilePatternReceiver or VFSLogFilePatternReceiver (if over ssh)
- JMSAppender and custom code to write the events to a database and CustomSQLDBReceiver
- JDBCAppender (http://www.dankomannhaupt.de/projects/) and CustomSQLDBReceiver

The Chainsaw config can be managed by IT and accessed via URL

RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo

2006-02-27 Thread Scott Deboy
A few things:

1. You can configure Chainsaw to always load a configuration on startup
 View, show application wide preferences, configuration URL
2. The configuration URL can reference a remote web site or local
 For example: http://www.mycompany.com/chainsaw-config.xml or 
file:///c:/chainsaw-config.xml
3. This configuration file can include definitions for multiple receivers.
 See the example receiver configuration available from Chainsaw's Welcome tab
4. You can change the configuration URL and restart Chainsaw and the new 
configuration will be used

My point is that you can create any number of configuration files that allow 
Chainsaw to load any combination of these logs that you may be interested in.

You may want to create a configuration file per application generating the logs.

On the developer side, it wouldn't matter where the event source is (database, 
log file, ssh, network), as long as their client had network access to where 
the log is stored (database, file, etc).  Developers would just need a web page 
that told them:

- To access the WebSphere logs for prodA, use 
http://mycompany.com/chainsaw-configuration-proda.xml
- To access all of the WebSphere logs (prodA, B, C), use
http://mycompany.com/chainsaw-configuration-all-websphere.xml
etc, etc.

Someone (maybe someone in IT, maybe you) manages these xml configuration files 
(that person configures the 'plugin' entries in the config file with the 
information needed to access the log).

Should you collect log files onto one server?  

Only if the need for centralized management of the logs is greater than the 
degraded performance you're getting from writing to a remote log system 
(remember, the complexity of accessing the logs is hidden inside the receiver 
configuration files).

What's the best type of receiver?  I'd say the one that can read events that 
are already being generated: 
- LogFilePatternReceiver
  if log files are accessible from http:// or file:// URLs (tailing only works 
on file:// URLs for now)
- VFSLogFilePatternReceiver
  if log file sare accessible via SSH or SMB or some other Jakarta commons-vfs 
supported file system - next Chainsaw update will also prompt in a GUI for 
username/password if needed
- CustomSQLDBReceiver
  if events are stored in a database
- SocketHubAppender
  if you don't mind blocking - with SocketHubAppender the server doesn't need 
to know about the IP addresses of each connected Chainsaw client

Blocking:
SocketAppender/SocketReceiver and SocketHubAppender/SocketHubReceiver use TCP 
socket connections to send Java-serialized logging events over the wire from 
the appender to the receiver.  TCP sockets can 'block' (cause the thread 
sending the data to hang) if the receiver end can't keep up with the appender 
end.

Hope this helps,


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: Giancarlo V Martinez [mailto:[EMAIL PROTECTED]
Sent: Mon 2/27/2006 2:05 PM
To: Log4J Users List
Cc: Log4J Users List
Subject: RE: Question about having a distributed log4j/Chainsaw environment, 
receiver/appender combo
 





Scott thank you for your reply.  I decided to use  a picture to best
describe what we are trying to do and why.
___ ___  ___
   |   |   |   ||   |
   |   WEBSPHERE   |   |   WEBSPHERE   ||   WEBSPHERE   |
   |   APPLICATION |   |   APPLICATION ||   APPLICATION |
   |   SERVER  |   |   SERVER  ||   SERVER  |
   |   |   |   ||   |
___ ___  ___
 \ |/
  \|   /
   \   |  /
\ ???  | ??? / ??? - Don't know
what is the best
 \ |/ type of
Appender/Receiver?
  \|   /
   \   |  /
(-)
 _
|  Logging DB |
| |  ???- Oracle DB
calls?  |  written to |
|LOG SERVER
|-| by stored   |
| |
| procedures  |
 _
| using Log4PLSQL
/  |\
|  **see note 2

RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo

2006-02-27 Thread Giancarlo V Martinez

Scott,

You hit the nail on the head when you said, On the developer side, it wouldn't matter where the event source is (database, log file, ssh, network), as long as their client had network access to where the log is stored.  The problem I am having is since we are in such a secure environment, the Client does not have network access to the event source.   We thought of a central log server, which has access to the app servers, and which can be accessed by the clients.  With the Log Server, we would only have to create a connection from the log server to the App Servers, through the firewall. The log files themselves would still reside locally on the App Servers, we just wanted the Log Server to pass the logging from the App Servers to the Clients.   

Basically the question I still have is, is it possible to set up a distributed environment  for logging and have the logs reside locally on the App Servers, and in a DB for the Stored Procedure logging?  From what I have read, I am unsure, hence the question.  Would the alternative be for the App Servers to log remotely to the Log Server, and all the logs would reside on the Log Server?  Then the clients would read the log files off of the Log Server?


Thank you,
Giancarlo V. Martinez

11501 Burnet Rd 902-4, B-020
Austin TX, 78758
Office: (512)-838-9489; T/L 678-9489; Fax: (512)-823-0035
Scott Deboy [EMAIL PROTECTED]








Scott Deboy [EMAIL PROTECTED] 
02/27/2006 04:57 PM

Please respond to
Log4J Users List








To
Log4J Users List log4j-user@logging.apache.org


cc



Subject
RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo








A few things:

1. You can configure Chainsaw to always load a configuration on startup
 View, show application wide preferences, configuration URL
2. The configuration URL can reference a remote web site or local
 For example: http://www.mycompany.com/chainsaw-config.xmlor file:///c:/chainsaw-config.xml
3. This configuration file can include definitions for multiple receivers.
 See the example receiver configuration available from Chainsaw's Welcome tab
4. You can change the configuration URL and restart Chainsaw and the new configuration will be used

My point is that you can create any number of configuration files that allow Chainsaw to load any combination of these logs that you may be interested in.

You may want to create a configuration file per application generating the logs.

On the developer side, it wouldn't matter where the event source is (database, log file, ssh, network), as long as their client had network access to where the log is stored (database, file, etc). Developers would just need a web page that told them:

- To access the WebSphere logs for prodA, use http://mycompany.com/chainsaw-configuration-proda.xml
- To access all of the WebSphere logs (prodA, B, C), use
http://mycompany.com/chainsaw-configuration-all-websphere.xml
etc, etc.

Someone (maybe someone in IT, maybe you) manages these xml configuration files (that person configures the 'plugin' entries in the config file with the information needed to access the log).

Should you collect log files onto one server? 

Only if the need for centralized management of the logs is greater than the degraded performance you're getting from writing to a remote log system (remember, the complexity of accessing the logs is hidden inside the receiver configuration files).

What's the best type of receiver? I'd say the one that can read events that are already being generated: 
- LogFilePatternReceiver
 if log files are accessible from http:// or file:// URLs (tailing only works on file:// URLs for now)
- VFSLogFilePatternReceiver
 if log file sare accessible via SSH or SMB or some other Jakarta commons-vfs supported file system - next Chainsaw update will also prompt in a GUI for username/password if needed
- CustomSQLDBReceiver
 if events are stored in a database
- SocketHubAppender
 if you don't mind blocking - with SocketHubAppender the server doesn't need to know about the IP addresses of each connected Chainsaw client

Blocking:
SocketAppender/SocketReceiver and SocketHubAppender/SocketHubReceiver use TCP socket connections to send Java-serialized logging events over the wire from the appender to the receiver. TCP sockets can 'block' (cause the thread sending the data to hang) if the receiver end can't keep up with the appender end.

Hope this helps,


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: Giancarlo V Martinez [mailto:[EMAIL PROTECTED]]
Sent: Mon 2/27/2006 2:05 PM
To: Log4J Users List
Cc: Log4J Users List
Subject: RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo
 





Scott thank you for your reply. I decided to use a picture to best
describe what we are trying to do

RE: Question about having a distributed log4j/Chainsaw environment, receiver/appender combo

2006-02-27 Thread Scott Deboy
Your network admin should be able to devise a plan to get you access to the 
logs without having to replicate them (nfs/ssh?).

Log4j's appenders and receivers -could- be used in a single log4j configuration 
file to 'forward' events from one environment to another (events received by 
any receiver will processed by any appender), but I don't think that's a great 
idea in your case, since the only receiver that could work is 
logfilepatternreceiver, and it doesn't handle file rollovers gracefully.

Good luck

Scott

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: Giancarlo V Martinez [mailto:[EMAIL PROTECTED]
Sent: Mon 2/27/2006 4:15 PM
To: Log4J Users List
Subject: RE: Question about having a distributed log4j/Chainsaw environment, 
receiver/appender combo
 





Scott,

You hit the nail on the head when you said, On the developer side, it
wouldn't matter where the event source is (database, log file, ssh,
network), as long as their client had network access to where the log is
stored.  The problem I am having is since we are in such a secure
environment, the Client does not have network access to the event source.
We thought of a central log server, which has access to the app servers,
and which can be accessed by the clients.  With the Log Server, we would
only have to create a connection from the log server to the App Servers,
through the firewall. The log files themselves would still reside locally
on the App Servers, we just wanted the Log Server to pass the logging from
the App Servers to the Clients.

Basically the question I still have is, is it possible to set up a
distributed environment  for logging and have the logs reside locally on
the App Servers, and in a DB for the Stored Procedure logging?  From what I
have read, I am unsure, hence the question.  Would the alternative be for
the App Servers to log remotely to the Log Server, and all the logs would
reside on the Log Server?  Then the clients would read the log files off of
the Log Server?


Thank you,
Giancarlo V. Martinez

11501 Burnet Rd 902-4, B-020
Austin TX, 78758
Office: (512)-838-9489; T/L 678-9489; Fax: (512)-823-0035


   
 Scott Deboy 
 [EMAIL PROTECTED] 
 stems.com To 
   Log4J Users List  
 02/27/2006 04:57  log4j-user@logging.apache.org 
 PM cc 
   
   Subject 
 Please respond to RE: Question about having a 
   Log4J Usersdistributed log4j/Chainsaw  
   List   environment, receiver/appender  
   combo   
   
   
   
   
   
   




A few things:

1. You can configure Chainsaw to always load a configuration on startup
 View, show application wide preferences, configuration URL
2. The configuration URL can reference a remote web site or local
 For example: http://www.mycompany.com/chainsaw-config.xml or
file:///c:/chainsaw-config.xml
3. This configuration file can include definitions for multiple receivers.
 See the example receiver configuration available from Chainsaw's Welcome
tab
4. You can change the configuration URL and restart Chainsaw and the new
configuration will be used

My point is that you can create any number of configuration files that
allow Chainsaw to load any combination of these logs that you may be
interested in.

You may want to create a configuration file per application generating the
logs.

On the developer side, it wouldn't matter where the event source is
(database, log file, ssh, network), as long as their client had network
access to where the log is stored (database, file, etc).  Developers would
just need a web page that told them:

- To access the WebSphere logs for prodA, use
http://mycompany.com/chainsaw-configuration-proda.xml
- To access all of the WebSphere logs (prodA, B, C), use
http

Re: Question about Date Format

2006-02-26 Thread Curt Arnold


On Feb 26, 2006, at 10:54 AM, Avinash Sridhar wrote:


Hello All,
   I am maintaing some code. The requirement is to change this  
format ,

for the application

6-02-15, which, I am hoping is coming from here,  
defaultProps.setProperty( 

log4j.appender.main.DatePattern, '.'-MM-dd) ;

If it is coming from there, why is it not coming as 2006, it is  
coming as

6?, I suspect it is coming from here then right?.

Is there some other place from where the logging information is  
coming.


Anyway, i changed it to defaultProps.setProperty( 
log4j.appender.main.DatePattern, '.'MM-dd-) ;

and expected the .log file to show up in this format 02-15-6, but i  
didnt

get it in this format. How do i go about doing this?.

Is it coming from somewhere else?.

Kindly let me know if you require some more information regarding  
the code.


Thanks for looking in

Avinash


log4j configuration is described in http://logging.apache.org/log4j/ 
docs/manual.html.


log4j can be configured programmatically (that is by explicit calls  
to the log4j API) and also provides two file configurators (an XML  
format and a properties file format).  It does not, however, provide  
any mechanism to configure itself directly from system properties.   
If a system property affects the date format, it is only by  
influencing parameters to API calls or by use in an expression (of  
the form ${propname}) within an XML or property configuration file.


Getting a date formatted like 6-02-15 suggest that a width specifier  
was used which resulted in 2006-02-15 being left truncated.


If you are getting any logging, something is configuring log4j.   
Check for the presence of a log4j.properties or log4j.xml file as  
that would be a common mechanism to configure log4j.  Otherwise,  
check for references to PropertyConfigurator or DOMConfigurator or  
calls to Logger.addAppender (which would be likely be present in code  
programmatically configuring log4j).  Once you have determined how  
log4j is being configured, then we would be able to offer advice on  
how to change the formatting.



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



Re: Colorized console output (was Re: question)

2005-08-23 Thread Nicolas Martignole
Hi 
I wrote a WriterAppender a while ago that uses ANSI colors.
It's like a ConsoleAppender, using ANSI colors.

See the full article here 
http://www.jroller.com/page/Trecollo/20041013

Nicolas Martignole

2005/8/20, Curt Arnold [EMAIL PROTECTED]:
 
 On Aug 17, 2005, at 4:24 PM, Yixing Ma wrote:
 
  Hi,
  Is there a way to change the color of debug, info, error and warn
  in the console?
 
 
 There was a rejected bug (http://issues.apache.org/bugzilla/
 show_bug.cgi?id=19920) that contained one persons approach to the
 issue (with a patch which you could use for yourself).
 
 A ConsoleAppender might not be writing to a console device, it may be
 redirected to a file or another application where the escape codes to
 add color might not be desired.  So it isn't desirable to
 unconditionally add color without some user configuration.  Also,
 since log4j console output could be interspersed with other console
 output, you'd need to make sure to reset the color after each message.
 
 The layout would likely be the right place to add color.  For
 example, a colorized TelnetAppender would be equally valid as a
 colorized ConsoleAppender and placing it in the layout would allow
 both applications to share the supporting code.
 
 I'm guessing the referenced patch only prints the level in color, for
 example, WARN in yellow.  I don't know if that is what you wanted, or
 if you'd like the entire message body in color.
 
 I have on my long wish list to add a localizing layout that could
 make pattern substitutions in the logging process (http://
 issues.apache.org/bugzilla/show_bug.cgi?id=32810).  If such a thing
 existed, you could translate the standard english text into text
 wrapped by VT-100 escape codes.  This use might make an interesting
 use case, if I ever get to that.
 
 
 -
 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]



Colorized console output (was Re: question)

2005-08-20 Thread Curt Arnold


On Aug 17, 2005, at 4:24 PM, Yixing Ma wrote:


Hi,
Is there a way to change the color of debug, info, error and warn  
in the console?



There was a rejected bug (http://issues.apache.org/bugzilla/ 
show_bug.cgi?id=19920) that contained one persons approach to the  
issue (with a patch which you could use for yourself).


A ConsoleAppender might not be writing to a console device, it may be  
redirected to a file or another application where the escape codes to  
add color might not be desired.  So it isn't desirable to  
unconditionally add color without some user configuration.  Also,  
since log4j console output could be interspersed with other console  
output, you'd need to make sure to reset the color after each message.


The layout would likely be the right place to add color.  For  
example, a colorized TelnetAppender would be equally valid as a  
colorized ConsoleAppender and placing it in the layout would allow  
both applications to share the supporting code.


I'm guessing the referenced patch only prints the level in color, for  
example, WARN in yellow.  I don't know if that is what you wanted, or  
if you'd like the entire message body in color.


I have on my long wish list to add a localizing layout that could  
make pattern substitutions in the logging process (http:// 
issues.apache.org/bugzilla/show_bug.cgi?id=32810).  If such a thing  
existed, you could translate the standard english text into text  
wrapped by VT-100 escape codes.  This use might make an interesting  
use case, if I ever get to that.



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



Re: Question about appender

2005-02-03 Thread Curt Arnold
I'm not sure if I understand the situation, but it might be a case 
where you would want to use the OutputDebugStringAppender (which calls 
the Win32 method of the same name).  The messages sent to this appender 
will be viewed by any attached debugger.  DebugView 
(http://www.sysinternals.com/ntw2k/freeware/debugview.shtml) is a free 
(as in beer, not speech) utility for watching all calls to 
OutputDebugString on a system and I believes supports remote 
monitoring.

On Feb 3, 2005, at 3:18 PM, Seshachala, Sudhendra B wrote:
We have an windows GUI tool hosted in IIS.
The users basically use the JNLP to download the tool and use the tool.
We do log the meesages to a file.
Now, if I switch the file appender to console, then I don't see if the
console popping up or any console messages.
Are there any alternative appenders we need to use for this purpose..
During debugging, When I use eclipse to debug, I do see these messages
in Eclipse console window..
Pls. let me know.. Of any solution..
Thanks
Sudhendra (Sudhi) Seshachala
Office  : 281-514-0918
Cell: 408-203-9960
Mail to: [EMAIL PROTECTED]

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


RE: Question?

2005-01-06 Thread Lutz Michael


logger name=com.organisation.sus.broadband additivity=false
level value=DEBUG_4 /
/logger


-Original Message-
From: Alan Lewis [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 06, 2005 11:02 AM
To: log4j-user@logging.apache.org
Subject: Question?


Hi 


Can anyone tell me if the additivity property of the loggers can be
specified in the configuration file? I know it an be set
programmatically, but a single configuration point that is applied
globally is more robust.

e.g.
...
logger name=com.organisation.sus.broadband
  level value=INFO/
additivity value=false/ OR
param name=additivity value=false /
  appender-ref ref=InfoRollingFileAppender_pres/
/logger

 
appender name=InfoRollingFileAppender_pres
class=org.apache.log4j.DailyRollingFileAppender
  param name=DatePattern value=.-MM-dd/
  param name=encoding value=UTF-8/
  param name=ImmediateFlush value=true/
  param name=Threshold value=INFO/
  param name=File
value=/usr/local/beadomains/fsmap/logs/bpres_info.log/
layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d{HH:mm:ss} %-4r [%t] %-5p
%c %x - %m%n/
/layout
   /appender
...

The ultimate intent is to have a different log file for each Priority;
INFO.log, DEBUG.log, WARNING.log,...

I know there are GUI apps (Chainsaw, LF5), that can filter by log record
levels, but there is a political issue with using gui tools on the
production server.
Any help appreciated.


Regards
Alan Lewis


This email and the files transmitted with it are meant solely for the use of
the individual addressee(s) named above. They may contain confidential
and/or legally privileged information. If you are not the addressee(s) or
responsible for delivery of the message to the addressee(s), please delete
it from your system and contact the sender right away. The opinions,
conclusions and other information in this message which do not relate to the
official business of Wanadoo UK plc are not necessarily endorsed by it.
Wanadoo UK plc has taken steps to ensure that this email and any attachments
are virus-free, but it remains your responsibility to confirm and ensure
this.  

 

Wanadoo UK plc is a subsidiary of Wanadoo SA. Our registered office is at:
Maylands Avenue, Hemel Hempstead, Herts, HP2 7TG, and we are registered in
England and Wales, as Company No. 3014367


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

---
This message and any included attachments are from Siemens Medical Solutions 
USA, Inc. and are intended only for the addressee(s).  
The information contained herein may include trade secrets or privileged or 
otherwise confidential information.  Unauthorized review, forwarding, printing, 
copying, distributing, or using such information is strictly prohibited and may 
be unlawful.  If you received this message in error, or have reason to believe 
you are not authorized to receive it, please promptly delete this message and 
notify the sender by e-mail with a copy to [EMAIL PROTECTED] 

Thank you

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



Re: Question about getLogger() references

2004-10-18 Thread Ceki Gülcü
In general, log1==log2 where log1 and log2 are defined as
Logger log1=Logger.getLogger( x );
Logger log2=Logger.getLogger( x );
However, if you are using a special repository selector under the surface, 
then log1 may be different from log2.

At 03:05 PM 10/18/2004, you wrote:
I have a question about the references returned via the getLogger method
that I hope someone can answer easily.  Assuming that multiple calls were
made to the Logger.getLogger() method(with the same parm), would they all
return exactly the same reference? ie...
When the call:
private static final Logger log1=Logger.getLogger( sameclass.class );
is made,  and for some reason another call is made for a temporary logger
at some later point in the program execution:
private Logger log2=Logger.getLogger( sameclass.class );
Would the following ALWAYS be true?   log1 == log2  (reference
compare...not using the .equals() method)
Thanks,
   Doug Clifton
--
Ceki Gülcü
 For log4j documentation consider The complete log4j manual
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  


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


Re: Question about getLogger() references

2004-10-18 Thread clido01
Thanks Ceki, I figured it was a mixed answer.  Appreciate the info.


 In general, log1==log2 where log1 and log2 are defined as

 Logger log1=Logger.getLogger( x );
 Logger log2=Logger.getLogger( x );

 However, if you are using a special repository selector under the surface,
 then log1 may be different from log2.


 At 03:05 PM 10/18/2004, you wrote:
I have a question about the references returned via the getLogger method
that I hope someone can answer easily.  Assuming that multiple calls were
made to the Logger.getLogger() method(with the same parm), would they all
return exactly the same reference? ie...

When the call:

private static final Logger log1=Logger.getLogger( sameclass.class );

is made,  and for some reason another call is made for a temporary logger
at some later point in the program execution:

private Logger log2=Logger.getLogger( sameclass.class );

Would the following ALWAYS be true?   log1 == log2  (reference
compare...not using the .equals() method)

Thanks,
Doug Clifton

 --
 Ceki Gülcü

   For log4j documentation consider The complete log4j manual
   ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp



 -
 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]



RE: Question about implementation of SocketAppender

2004-08-05 Thread Scott Deboy
Hi Tom,

If you don't mind me asking, what functionality is missing in the current appender 
that you need?

Scott

-Original Message-
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent:   Thu 8/5/2004 12:04 PM
To: [EMAIL PROTECTED]
Cc: 
Subject:Question about implementation of SocketAppender
Anyone know why the SocketAppender doesn't have a setter for the 
address member variable.

This appears to make it impossible to extend the class (since the connect 
method checks this.address for null and returns if it is true--even though 
the method takes an InetAddress as a parameter, and the parameter value is 
the one that is used in the method).

It seems to me that the address member variable could be removed 
entirely, and the check in connect could be removed, then sub-classing 
would be possible and the current logic would remain.

Any comments? Any log4j developers that want to implement this trivial 
change?

--
Tom Goetze



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

RE: Question about implementation of SocketAppender

2004-08-05 Thread Tom . Goetze
I'm thinking about extending it so that it starts its own SocketServer on 
the correct port.
This way, even with potentially multiple JVMs running, there will only be 
one SocketServer, so there will only be one process writing to a 
particular log file (so having the SocketServer use a rolling file 
appender will be safe).

This is because when there are multiple JVMs running, only 1 of the JVMs 
will be able to have its SocketServer bind to the port, the others will 
fail (quietly) but the ability to log as clients to the SocketServer will 
succeed.

This avoids the hassle of writing a process to monitor a separate 
SocketServer, and re-start it if it isn't running. Of course this only 
works for multiple JVMs on the same host, but that is my current issue.

Scott, were you willing to change the code? Or were you just curious?

--
Tom Goetze



Hi Tom,

If you don't mind me asking, what functionality is missing in the current 
appender that you need?

Scott

-Original Message-
From:[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent:Thu 8/5/2004 12:04 PM
To:  [EMAIL PROTECTED]
Cc: 
Subject: Question about implementation of SocketAppender
Anyone know why the SocketAppender doesn't have a setter for the 
address member variable.

This appears to make it impossible to extend the class (since the connect 
method checks this.address for null and returns if it is true--even though 

the method takes an InetAddress as a parameter, and the parameter value is 

the one that is used in the method).

It seems to me that the address member variable could be removed 
entirely, and the check in connect could be removed, then sub-classing 
would be possible and the current logic would remain.

Any comments? Any log4j developers that want to implement this trivial 
change?

--
Tom Goetze



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



Re: Question about implementation of SocketAppender

2004-08-05 Thread Ceki Gülcü
At 09:04 PM 8/5/2004, you wrote:
Anyone know why the SocketAppender doesn't have a setter for the
address member variable.
Address is the internal representation of the remoteHost variable.
This appears to make it impossible to extend the class (since the connect
method checks this.address for null and returns if it is true--even though
the method takes an InetAddress as a parameter, and the parameter value is
the one that is used in the method).
connect is also a default access (package protected) method.
It seems to me that the address member variable could be removed
entirely, and the check in connect could be removed, then sub-classing
would be possible and the current logic would remain.
This does not makes sense.
Any comments? Any log4j developers that want to implement this trivial
change?
At this stage, there is clearly a misunderstanding. As far as I can tell, 
there is no trivial change.

--
Tom Goetze
--
Ceki Gülcü
 For log4j documentation consider The complete log4j manual
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  


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


RE: Question on Log4J Reliability

2004-01-15 Thread Shapira, Yoav

Howdy,
We've been using log4j in production for years without any failures.

He means reliable in a less common sense of the word, I think, in that
log4j will notify you if it fails and try to do its best to continue.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Edmund Y Dean [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 11:30 AM
To: Log4J Users List
Subject: Question on Log4J Reliability

Greetings all,

I've been looking into possibly using Log4J for some
application/transactional logging uses (like access logs or user
auditing ,etc.)  However, I'm concerned about the statement in the FAQ
that it is not a reliable logging system.  What is the definition of
a
reliable logging system?  Is Log4J recommended only for use for
development/debugging/system status type logging, or is it robust
enough
for transactional logging?

If Log4J isnt really suited to the task, can anyone recommend something
that might be better?



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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