|
From: Leif M. <le...@ta...> - 2008-01-11 11:01:29
|
Luc,
Ok. Yes. When I was doing work on the Wrapper's native library,
I noticed that. For some reason output to stdout and stderr is not
flushed automatically from the native library. I assume that java is
doing something to its own process to give itself more control over
that output for performance reasons.
I had to do the following to get it to be logged immediately:
printf("Test Message\n"); fflush(NULL);
This doesn't have anything to do with the Wrapper. You should see
the same thing without the Wrapper.
Cheers,
Leif
Luc Boutier wrote:
> Hi Leif,
>
> Thanks for the quick answer. I'm using XP SP2 and the wrapper version 3.2.3.
> In fact I think that I maybe know the reason of the strange behavior but I'm
> not really sure.. the fact is that those messages that are delayed are maybe
> not sysout but stuff coming from a native library (I don't have source code
> access so I'm not really sure..)
>
> Cheers,
> Luc
>
>
>> -----Message d'origine-----
>> De : wra...@li... [mailto:wrapper-user-
>> bo...@li...] De la part de Leif Mortenson
>> Envoyé : jeudi 10 janvier 2008 15:55
>> À : wra...@li...
>> Objet : Re: [Wrapper-user] Can't get JVM output logged correclty (flush
>> doesn't seems to work)
>>
>> Luc,
>> What platform and version are you using? Are you seeing anything
>> at all in the log or is only output from the JVM that is being delayed?
>> I am not aware of any problems like this in the past.
>>
>> Cheers,
>> Leif
>>
>>
>> Luc Boutier wrote:
>>
>>> Hi,
>>>
>>> I have set the wrapper to log JVM input into a file and
>>> wrapper.console.flush=true to have “sysout” lines written
>>> synchronously in the log but the JVM output only appears after
>>> stopping the service.
>>>
>>> The stuff that are logged using logging are correctly written in
>>> ‘real-time’.
>>>
>>> See my configuration:
>>>
>>> #********************************************************************
>>>
>>> # Wrapper Logging Properties
>>>
>>> #********************************************************************
>>>
>>> # Format of output for the console. (See docs for formats)
>>>
>>> wrapper.console.format=PM
>>>
>>> wrapper.console.flush=true
>>>
>>> # Log Level for console output. (See docs for log levels)
>>>
>>> wrapper.console.loglevel=INFO
>>>
>>> # Log file to use for wrapper output logging.
>>>
>>> wrapper.logfile=../logs/wrapper.log
>>>
>>> # Format of output for the log file. (See docs for formats)
>>>
>>> wrapper.logfile.format=LPTM
>>>
>>> # Log Level for log file output. (See docs for log levels)
>>>
>>> wrapper.logfile.loglevel=INFO
>>>
>>> # Maximum size that the log file will be allowed to grow to before
>>>
>>> # the log is rolled. Size is specified in bytes. The default value
>>>
>>> # of 0, disables log rolling. May abbreviate with the 'k' (kb) or
>>>
>>> # 'm' (mb) suffix. For example: 10m = 10 megabytes.
>>>
>>> wrapper.logfile.maxsize=0
>>>
>>> # Maximum number of rolled log files which will be allowed before old
>>>
>>> # files are deleted. The default value of 0 implies no limit.
>>>
>>> wrapper.logfile.maxfiles=0
>>>
>>> # Log Level for sys/event log output. (See docs for log levels)
>>>
>>> wrapper.syslog.loglevel=NONE
>>>
>>> Any Idea ?
>>>
>>> Thanks,
>>>
>>> Luc
>>>
|