Hi Dinesh, and Josef

Hi this is a cheap solution, to set permissions etc. The better way is
this. As you see, in Linux, the std-streams are mapped to files. If you
write to those files they will be written to the respective streams
irrespective of what and how you write.

You can't prioritize redirects to specific locations. That means it is
impossible to write error messages to one and debug messages to another
according to the current implementation. However, you should be able to
write to several locations with priorities if you build yourself a little
extension. This is the process.

1. You'll have to figure out how to write to stdout. That means you have
to write to that file that maps to the stdout stream.
2. You will run your axis_based_executable inside another.
3. Read more on how you could use fork and exec to create background
processes so that you can run one application inside another.
4. You outer application will barely listen to the stdout stream.
5. Then it is upto your outer application to do the logging.
6. Identification of error/debug etc messages can be done using a regular
expression parsing mechanism.

Startup Workflow:

A - outer_client
B - inner_axis_based_client

1. run A
2. A runs B (background)
3. B writes logs to stdout
4. A listens to stdout
5. A writes to log_file, stderror etc.

Exit Workflow:

A - outer_client
B - inner_axis_based_client

1. A catches Ctrl+C
2. A kills B
3. A exits


I know that this is so complicated but I don't see any better way.

Regards,
Senaka

> Hi,
>
> "Stadelmann Josef" <[EMAIL PROTECTED]> writes:
>
>> Thanks, but as I do not use axis2 simple server ...
>> I am jsut using the axiom libs and libs forming the base
>> such as axutil and libxml2 etc.
>>
>> What do I use to redirect output in code?
>>     axis_log = axutil_log_create(allocator, NULL, NULL);
>> this creates an axis2.log under . directory
>
> AFAIK , there is a no such a way to redirect out put to stdout or
> stderr.  However I could say you a small workaround for this. Try to
> assign a log file which doesn't have write permission.
>
> For example, if your logs written into echo.log, set it's file
> permission to 333 (or 000).
>
> $chmod 000 axis2.log (this is not recommended though)
>
> It will redirect output to stderr then, and please raise a jira issue
> for this.
>
> thanks,
> Dinesh
> --
> http://nethu.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to