You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Raghavendra SM <ra...@aylus.com> on 2007/09/03 09:40:35 UTC

Issues with the log directory

Hi All,

 

Axis2C, by default writes the axis2.log file to logs directory. But we
need to write the axis2.log to a new directory say, axis2_log. 

I tried changing the Makefile and Makefile.in as below,

 

logsdir=$(prefix)/logs  # old

logsdir=$(prefix)/axis_logs  #mine

 

With the above changes, the log isn’t getting written to the new path.
Are the changes done above are valid and relevent? Is there any other
configuration that needs to be tuned? Or is it needs to taken care at
the code level of axutil? Please reply.

 

P.S: even Makefile.am has logsdir=$(prefix)/logs, which I haven’t
changed. Does it matter?

 

Regards,

~raghav

 

 



Re: Issues with the log directory

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi,

  If you want to specify a new location for log file. You could do it
   at environment creation time. 

   env = axutil_env_create_all("echo.log", AXIS2_LOG_LEVEL_DEBUG);

I think, You can replace "echo.log" with the Full path of the log
file. Please see echo sample (client) for more details.

thanks,
Dinesh
-- 
Dinesh Premalal
http://xydinesh.wordpress.com/
GPG ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Issues with the log directory

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi,
There is minor modification to my previous reply. You have to create the
directory(Which you change according to your preference in axutil_log_create
function) before you start the axis2_engine. Other wise It'will put logs
inside working directory, because it can't find the directory.

Thanks
Milinda


On 9/3/07, Milinda Pathirage <mi...@gmail.com> wrote:
>
> Hi,
>
> To change the default log directory you have to change the implementation
> of axutil_log_create function inside log.c file. In current implementation
> it create the path of the log directory is by concatenating "logs" with
> AXIS2C_HOME value (Or if AXIS2C_HOME not available logs will create inside
> current working directory). So you have to change this default implementatio
> of axutil_log_create function to put the log in other directory than the
> default directory. Please look at the above function and you will be able to
> figure out the solution which suitable to your needs.
>
> 'Thanks
>
> Milinda
>
>
>
>
>
>  On 9/3/07, Kaushalye Kapuruge <ka...@wso2.com> wrote:
> >
> > Hmm.. have you tried axutil_env_create_all() function ?
> > There you can specify the log file name.
> > -Kaushalye
> >
> > Raghavendra SM wrote:
> > > Kaushalye,
> > >
> > > We are not starting the axis2_http_server as below. Its done
> > > programmatically and not through command line, we are invoking
> > axis_init
> > > related functions ourselves.
> > >
> > > Regards,
> > > ~raghav
> > >
> > >
> > > -----Original Message-----
> > > From: Kaushalye Kapuruge [mailto:kaushalye@wso2.com]
> > > Sent: Monday, September 03, 2007 3:19 PM
> > > To: Apache AXIS C User List
> > > Subject: Re: Issues with the log directory
> > >
> > > Hi Raghav,
> > >
> > > You may use the -f option when you start the server.
> > >
> > > Usage : ./axis2_http_server [-p PORT] [-t TIMEOUT] [-r REPO_PATH] [-l
> > > LOG_LEVEL] [-f LOG_FILE]
> > >  Options :
> > >         -p PORT          port number to use, default port is 9090
> > >         -r REPO_PATH     repository path, default is ../
> > >         -t TIMEOUT       socket read timeout, default is 30 seconds
> > >         -l LOG_LEVEL     log level, available log levels:
> > >                          0 - critical    1 - errors 2 - warnings
> > >                          3 - information 4 - debug  5- trace
> > >                          Default log level is 4(debug).
> > >         -f LOG_FILE      log file, default is
> > > $AXIS2C_HOME/logs/axis2.log
> > >                          or axis2.log in current folder if AXIS2C_HOME
> > > not set
> > >
> > > Cheer,
> > > Kaushalye
> > >
> > > Raghavendra SM wrote:
> > >
> > >> Hi All,
> > >>
> > >>
> > >>
> > >> Axis2C, by default writes the axis2.log file to /logs/ directory. But
> > >> we need to write the axis2.log to a new directory say, /axis2_log/.
> > >>
> > >> I tried changing the Makefile and Makefile.in <http://makefile.in/>as below,
> > >>
> > >>
> > >>
> > >> logsdir=$(prefix)/logs  # old
> > >>
> > >> logsdir=$(prefix)/axis_logs  #mine
> > >>
> > >>
> > >>
> > >> With the above changes, the log isnt getting written to the new
> > >>
> > > path.
> > >
> > >> Are the changes done above are valid and relevent? Is there any other
> >
> > >> configuration that needs to be tuned? Or is it needs to taken care at
> > >> the code level of axutil? Please reply.
> > >>
> > >>
> > >>
> > >> P.S: even Makefile.am <http://makefile.am/> has
> > logsdir=$(prefix)/logs, which I havent
> > >> changed. Does it matter?
> > >>
> > >>
> > >>
> > >> Regards,
> > >>
> > >> ~raghav
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
> > --
> > http://kaushalye.blogspot.com/
> > http://wso2.org/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >
> >
>
>
> --
> milinda@wso2.com
> WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform"
> http://www.milindalakmal.wordpress.com




-- 
milinda@wso2.com
WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform"
http://www.milindalakmal.wordpress.com

Re: Issues with the log directory

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi,

To change the default log directory you have to change the implementation of
axutil_log_create function inside log.c file. In current implementation it
create the path of the log directory is by concatenating "logs" with
AXIS2C_HOME value (Or if AXIS2C_HOME not available logs will create inside
current working directory). So you have to change this default implementatio
of axutil_log_create function to put the log in other directory than the
default directory. Please look at the above function and you will be able to
figure out the solution which suitable to your needs.

'Thanks

Milinda





On 9/3/07, Kaushalye Kapuruge <ka...@wso2.com> wrote:
>
> Hmm.. have you tried axutil_env_create_all() function ?
> There you can specify the log file name.
> -Kaushalye
>
> Raghavendra SM wrote:
> > Kaushalye,
> >
> > We are not starting the axis2_http_server as below. Its done
> > programmatically and not through command line, we are invoking axis_init
> > related functions ourselves.
> >
> > Regards,
> > ~raghav
> >
> >
> > -----Original Message-----
> > From: Kaushalye Kapuruge [mailto:kaushalye@wso2.com]
> > Sent: Monday, September 03, 2007 3:19 PM
> > To: Apache AXIS C User List
> > Subject: Re: Issues with the log directory
> >
> > Hi Raghav,
> >
> > You may use the -f option when you start the server.
> >
> > Usage : ./axis2_http_server [-p PORT] [-t TIMEOUT] [-r REPO_PATH] [-l
> > LOG_LEVEL] [-f LOG_FILE]
> >  Options :
> >         -p PORT          port number to use, default port is 9090
> >         -r REPO_PATH     repository path, default is ../
> >         -t TIMEOUT       socket read timeout, default is 30 seconds
> >         -l LOG_LEVEL     log level, available log levels:
> >                          0 - critical    1 - errors 2 - warnings
> >                          3 - information 4 - debug  5- trace
> >                          Default log level is 4(debug).
> >         -f LOG_FILE      log file, default is
> > $AXIS2C_HOME/logs/axis2.log
> >                          or axis2.log in current folder if AXIS2C_HOME
> > not set
> >
> > Cheer,
> > Kaushalye
> >
> > Raghavendra SM wrote:
> >
> >> Hi All,
> >>
> >>
> >>
> >> Axis2C, by default writes the axis2.log file to /logs/ directory. But
> >> we need to write the axis2.log to a new directory say, /axis2_log/.
> >>
> >> I tried changing the Makefile and Makefile.in as below,
> >>
> >>
> >>
> >> logsdir=$(prefix)/logs  # old
> >>
> >> logsdir=$(prefix)/axis_logs  #mine
> >>
> >>
> >>
> >> With the above changes, the log isnt getting written to the new
> >>
> > path.
> >
> >> Are the changes done above are valid and relevent? Is there any other
> >> configuration that needs to be tuned? Or is it needs to taken care at
> >> the code level of axutil? Please reply.
> >>
> >>
> >>
> >> P.S: even Makefile.am has logsdir=$(prefix)/logs, which I havent
> >> changed. Does it matter?
> >>
> >>
> >>
> >> Regards,
> >>
> >> ~raghav
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
> --
> http://kaushalye.blogspot.com/
> http://wso2.org/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
milinda@wso2.com
WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform"
http://www.milindalakmal.wordpress.com

Re: Issues with the log directory

Posted by Kaushalye Kapuruge <ka...@wso2.com>.
Hmm.. have you tried axutil_env_create_all() function ?
There you can specify the log file name.
-Kaushalye

Raghavendra SM wrote:
> Kaushalye,
>
> We are not starting the axis2_http_server as below. Its done 
> programmatically and not through command line, we are invoking axis_init 
> related functions ourselves.
>
> Regards,
> ~raghav
>  
>
> -----Original Message-----
> From: Kaushalye Kapuruge [mailto:kaushalye@wso2.com] 
> Sent: Monday, September 03, 2007 3:19 PM
> To: Apache AXIS C User List
> Subject: Re: Issues with the log directory
>
> Hi Raghav,
>
> You may use the -f option when you start the server.
>
> Usage : ./axis2_http_server [-p PORT] [-t TIMEOUT] [-r REPO_PATH] [-l 
> LOG_LEVEL] [-f LOG_FILE]
>  Options :
>         -p PORT          port number to use, default port is 9090
>         -r REPO_PATH     repository path, default is ../
>         -t TIMEOUT       socket read timeout, default is 30 seconds
>         -l LOG_LEVEL     log level, available log levels:
>                          0 - critical    1 - errors 2 - warnings
>                          3 - information 4 - debug  5- trace
>                          Default log level is 4(debug).
>         -f LOG_FILE      log file, default is 
> $AXIS2C_HOME/logs/axis2.log
>                          or axis2.log in current folder if AXIS2C_HOME 
> not set
>
> Cheer,
> Kaushalye
>
> Raghavendra SM wrote:
>   
>> Hi All,
>>
>>  
>>
>> Axis2C, by default writes the axis2.log file to /logs/ directory. But 
>> we need to write the axis2.log to a new directory say, /axis2_log/.
>>
>> I tried changing the Makefile and Makefile.in as below,
>>
>>  
>>
>> logsdir=$(prefix)/logs  # old
>>
>> logsdir=$(prefix)/axis_logs  #mine
>>
>>  
>>
>> With the above changes, the log isnt getting written to the new 
>>     
> path. 
>   
>> Are the changes done above are valid and relevent? Is there any other 
>> configuration that needs to be tuned? Or is it needs to taken care at 
>> the code level of axutil? Please reply.
>>
>>  
>>
>> P.S: even Makefile.am has logsdir=$(prefix)/logs, which I havent 
>> changed. Does it matter?
>>
>>  
>>
>> Regards,
>>
>> ~raghav
>>
>>  
>>
>>  
>>
>>     
>
>
>   


-- 
http://kaushalye.blogspot.com/
http://wso2.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


RE: Issues with the log directory

Posted by Raghavendra SM <ra...@aylus.com>.
Kaushalye,

We are not starting the axis2_http_server as below. Its done 
programmatically and not through command line, we are invoking axis_init 
related functions ourselves.

Regards,
~raghav
 

-----Original Message-----
From: Kaushalye Kapuruge [mailto:kaushalye@wso2.com] 
Sent: Monday, September 03, 2007 3:19 PM
To: Apache AXIS C User List
Subject: Re: Issues with the log directory

Hi Raghav,

You may use the -f option when you start the server.

Usage : ./axis2_http_server [-p PORT] [-t TIMEOUT] [-r REPO_PATH] [-l 
LOG_LEVEL] [-f LOG_FILE]
 Options :
        -p PORT          port number to use, default port is 9090
        -r REPO_PATH     repository path, default is ../
        -t TIMEOUT       socket read timeout, default is 30 seconds
        -l LOG_LEVEL     log level, available log levels:
                         0 - critical    1 - errors 2 - warnings
                         3 - information 4 - debug  5- trace
                         Default log level is 4(debug).
        -f LOG_FILE      log file, default is 
$AXIS2C_HOME/logs/axis2.log
                         or axis2.log in current folder if AXIS2C_HOME 
not set

Cheer,
Kaushalye

Raghavendra SM wrote:
>
> Hi All,
>
>  
>
> Axis2C, by default writes the axis2.log file to /logs/ directory. But 
> we need to write the axis2.log to a new directory say, /axis2_log/.
>
> I tried changing the Makefile and Makefile.in as below,
>
>  
>
> logsdir=$(prefix)/logs  # old
>
> logsdir=$(prefix)/axis_logs  #mine
>
>  
>
> With the above changes, the log isnt getting written to the new 
path. 
> Are the changes done above are valid and relevent? Is there any other 
> configuration that needs to be tuned? Or is it needs to taken care at 
> the code level of axutil? Please reply.
>
>  
>
> P.S: even Makefile.am has logsdir=$(prefix)/logs, which I havent 
> changed. Does it matter?
>
>  
>
> Regards,
>
> ~raghav
>
>  
>
>  
>


-- 
http://kaushalye.blogspot.com/
http://wso2.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Issues with the log directory

Posted by Kaushalye Kapuruge <ka...@wso2.com>.
Hi Raghav,

You may use the -f option when you start the server.

Usage : ./axis2_http_server [-p PORT] [-t TIMEOUT] [-r REPO_PATH] [-l 
LOG_LEVEL] [-f LOG_FILE]
 Options :
        -p PORT          port number to use, default port is 9090
        -r REPO_PATH     repository path, default is ../
        -t TIMEOUT       socket read timeout, default is 30 seconds
        -l LOG_LEVEL     log level, available log levels:
                         0 - critical    1 - errors 2 - warnings
                         3 - information 4 - debug  5- trace
                         Default log level is 4(debug).
        -f LOG_FILE      log file, default is $AXIS2C_HOME/logs/axis2.log
                         or axis2.log in current folder if AXIS2C_HOME 
not set

Cheer,
Kaushalye

Raghavendra SM wrote:
>
> Hi All,
>
>  
>
> Axis2C, by default writes the axis2.log file to /logs/ directory. But 
> we need to write the axis2.log to a new directory say, /axis2_log/.
>
> I tried changing the Makefile and Makefile.in as below,
>
>  
>
> logsdir=$(prefix)/logs  # old
>
> logsdir=$(prefix)/axis_logs  #mine
>
>  
>
> With the above changes, the log isn’t getting written to the new path. 
> Are the changes done above are valid and relevent? Is there any other 
> configuration that needs to be tuned? Or is it needs to taken care at 
> the code level of axutil? Please reply.
>
>  
>
> P.S: even Makefile.am has logsdir=$(prefix)/logs, which I haven’t 
> changed. Does it matter?
>
>  
>
> Regards,
>
> ~raghav
>
>  
>
>  
>


-- 
http://kaushalye.blogspot.com/
http://wso2.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Issues with the log directory

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi,
Sorry for the mistake. Givng the full path to axutil_log_create function
will solve your problem.

inside log_create function this if condition will put log file in the path
you specified if it your path contains path seperators.

if (stream_name && !(axutil_rindex(stream_name, AXIS2_PATH_SEP_CHAR)))

Thanks.

Milinda


On 9/3/07, Samisa Abeysinghe <sa...@wso2.com> wrote:
>
> Raghavendra SM wrote:
> >
> > Hi All,
> >
> >
> >
> > Axis2C, by default writes the axis2.log file to /logs/ directory. But
> > we need to write the axis2.log to a new directory say, /axis2_log/.
> >
> > I tried changing the Makefile and Makefile.in as below,
> >
> >
> >
> > logsdir=$(prefix)/logs  # old
> >
> > logsdir=$(prefix)/axis_logs  #mine
> >
> >
> >
> > With the above changes, the log isn't getting written to the new path.
> > Are the changes done above are valid and relevent?
> >
> They are invalid and not relevant. This entry in the make file just
> ensures it creates the default logs folder.
> >
> > Is there any other configuration that needs to be tuned? Or is it
> > needs to taken care at the code level of axutil?
> >
> You have to do this at code level. You do not have to modify axutil.
> Rather you have to modify your code where you use Axis2/C.
> As an example, please have a look at the init_syetem_env function in
> src/core/transport/http/server/simple_axis2_server/http_server_main.c
> This is the main program of simple axis2 server and the given function
> creates the log based on the location given in log_file parameter.
> As Milinda mentioned in his reply, make sure you have created the folder
> structure - Axis2/C only creates the file, not the folders.
>
> HTH.
>
> Samisa...
> >
> > Please reply.
> >
> >
> >
> > P.S: even Makefile.am has logsdir=$(prefix)/logs, which I haven't
> > changed. Does it matter?
> >
> >
> >
> > Regards,
> >
> > ~raghav
> >
> >
> >
> >
> >
>
>
> --
> Samisa Abeysinghe : WSO2 WSF/C
> "
> http://wso2.org/projects/wsf/c?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework/C&nbsp;-&nbsp;Open&nbsp;source&nbsp;C&nbsp;library&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services
> "
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
milinda@wso2.com
WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform"
http://www.milindalakmal.wordpress.com

Re: Axis Core Dump while writing to log file

Posted by Samisa Abeysinghe <sa...@wso2.com>.
I have done a quick fix to the svn trunc to prevent the failure on the 
large file signal.
Whoever, switching to another file in case of a large file is yet to be 
handled.

Samisa...


Samisa Abeysinghe wrote:
> Raghavendra SM wrote:
>> Hi All,
>>
>> Please find below the GDB back trace of the core dump I found.
>>
>> Program terminated with signal 25, File size limit exceeded.
>> #0  0xb79ac2f1 in write () from /lib/tls/libc.so.6
>> (gdb) bt
>> #0  0xb79ac2f1 in write () from /lib/tls/libc.so.6
>> #1  0xb794ce4c in _IO_file_write () from /lib/tls/libc.so.6
>> #2  0xb794b869 in _IO_file_setbuf () from /lib/tls/libc.so.6
>> #3  0xb794b93f in _IO_do_write () from /lib/tls/libc.so.6
>> #4  0xb794c477 in _IO_file_sync () from /lib/tls/libc.so.6
>> #5  0xb79416e2 in fflush () from /lib/tls/libc.so.6
>> #6  0xb7af922b in axutil_log_impl_write_to_file () from 
>> /opt/aylus/lib/libaxutil.so.0
>> #7  0xb7af9320 in axutil_log_impl_log_debug () from 
>> /opt/aylus/lib/libaxutil.so.0
>> #8  0xb773a34d in axis2_http_worker_process_request 
>> (http_worker=0x81d4cc8, env=0x81d6348, svr_conn=0x81d6368,
>>     simple_request=0x81d6438) at http_worker.c:155
>> #9  0xb7aed01f in axis2_svr_thread_worker_func (thd=0x81c4180, 
>> data=0x81d4d00) at http_svr_thread.c:256
>> #10 0xb7b043af in dummy_worker () from /opt/aylus/lib/libaxutil.so.0
>> #11 0xb7f71ced in start_thread () from /lib/tls/libpthread.so.0
>> #12 0xb79bbdee in clone () from /lib/tls/libc.so.6
>>
>> When: It was produced when the axis2.log file was very huge (like 
>> 3451222890 Bytes) and axis tried to write some logs.
>>
>> Doubts: 1) Does axis2 log utility support writing to a new log file 
>> when ever a file becomes huge? If yes, how can we enable it?
>>   
> No. You are the first to report this bug. So now we know we have to 
> handle it. Please raise a Jira and we have to fix that.
>>       2) Does axis2 log utility support wrapping of the log file 
>> instead of appending to it after certain file size limit? If yes, how 
>> can we enable it?
>>   
> No, again, and it is a good idea to have this feature as well. Please 
> raise a Jira on this as well.
>>       3) Does axis2 has a way to preserve all the logs yet not crash 
>> due to file size limit?   
> Crashing is a bug. That needs fixing.
>>       4) If the answers are NO for all of the above questions, is 
>> axutil_log_impl_write_to_file() (before the fprintf, line #250)is the 
>> right place to support either of the above?
>>   
> Yes, that is probably where the fixes should go.
>
> Samisa...
>> Please reply. 
>> Regards,
>> ~raghav
>>  
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
>>   
>
>


-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Axis Core Dump while writing to log file

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Raghavendra SM wrote:
> Hi All,
>
> Please find below the GDB back trace of the core dump I found.
>
> Program terminated with signal 25, File size limit exceeded.
> #0  0xb79ac2f1 in write () from /lib/tls/libc.so.6
> (gdb) bt
> #0  0xb79ac2f1 in write () from /lib/tls/libc.so.6
> #1  0xb794ce4c in _IO_file_write () from /lib/tls/libc.so.6
> #2  0xb794b869 in _IO_file_setbuf () from /lib/tls/libc.so.6
> #3  0xb794b93f in _IO_do_write () from /lib/tls/libc.so.6
> #4  0xb794c477 in _IO_file_sync () from /lib/tls/libc.so.6
> #5  0xb79416e2 in fflush () from /lib/tls/libc.so.6
> #6  0xb7af922b in axutil_log_impl_write_to_file () from 
> /opt/aylus/lib/libaxutil.so.0
> #7  0xb7af9320 in axutil_log_impl_log_debug () from 
> /opt/aylus/lib/libaxutil.so.0
> #8  0xb773a34d in axis2_http_worker_process_request 
> (http_worker=0x81d4cc8, env=0x81d6348, svr_conn=0x81d6368,
>     simple_request=0x81d6438) at http_worker.c:155
> #9  0xb7aed01f in axis2_svr_thread_worker_func (thd=0x81c4180, 
> data=0x81d4d00) at http_svr_thread.c:256
> #10 0xb7b043af in dummy_worker () from /opt/aylus/lib/libaxutil.so.0
> #11 0xb7f71ced in start_thread () from /lib/tls/libpthread.so.0
> #12 0xb79bbdee in clone () from /lib/tls/libc.so.6
>
> When: It was produced when the axis2.log file was very huge (like 
> 3451222890 Bytes) and axis tried to write some logs.
>
> Doubts: 1) Does axis2 log utility support writing to a new log file when 
> ever a file becomes huge? If yes, how can we enable it?
>   
No. You are the first to report this bug. So now we know we have to 
handle it. Please raise a Jira and we have to fix that.
> 	  2) Does axis2 log utility support wrapping of the log file 
> instead of appending to it after certain file size limit? If yes, how 
> can we enable it?
>   
No, again, and it is a good idea to have this feature as well. Please 
raise a Jira on this as well.
> 	  3) Does axis2 has a way to preserve all the logs yet not crash 
> due to file size limit? 
>   
Crashing is a bug. That needs fixing.
> 	  4) If the answers are NO for all of the above questions, is 
> axutil_log_impl_write_to_file() (before the fprintf, line #250)is the 
> right place to support either of the above?
>   
Yes, that is probably where the fixes should go.

Samisa...
> Please reply.  
>
> Regards,
> ~raghav
>  
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
>   


-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Axis Core Dump while writing to log file

Posted by Raghavendra SM <ra...@aylus.com>.
Hi All,

Please find below the GDB back trace of the core dump I found.

Program terminated with signal 25, File size limit exceeded.
#0  0xb79ac2f1 in write () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb79ac2f1 in write () from /lib/tls/libc.so.6
#1  0xb794ce4c in _IO_file_write () from /lib/tls/libc.so.6
#2  0xb794b869 in _IO_file_setbuf () from /lib/tls/libc.so.6
#3  0xb794b93f in _IO_do_write () from /lib/tls/libc.so.6
#4  0xb794c477 in _IO_file_sync () from /lib/tls/libc.so.6
#5  0xb79416e2 in fflush () from /lib/tls/libc.so.6
#6  0xb7af922b in axutil_log_impl_write_to_file () from 
/opt/aylus/lib/libaxutil.so.0
#7  0xb7af9320 in axutil_log_impl_log_debug () from 
/opt/aylus/lib/libaxutil.so.0
#8  0xb773a34d in axis2_http_worker_process_request 
(http_worker=0x81d4cc8, env=0x81d6348, svr_conn=0x81d6368,
    simple_request=0x81d6438) at http_worker.c:155
#9  0xb7aed01f in axis2_svr_thread_worker_func (thd=0x81c4180, 
data=0x81d4d00) at http_svr_thread.c:256
#10 0xb7b043af in dummy_worker () from /opt/aylus/lib/libaxutil.so.0
#11 0xb7f71ced in start_thread () from /lib/tls/libpthread.so.0
#12 0xb79bbdee in clone () from /lib/tls/libc.so.6

When: It was produced when the axis2.log file was very huge (like 
3451222890 Bytes) and axis tried to write some logs.

Doubts: 1) Does axis2 log utility support writing to a new log file when 
ever a file becomes huge? If yes, how can we enable it?
	  2) Does axis2 log utility support wrapping of the log file 
instead of appending to it after certain file size limit? If yes, how 
can we enable it?
	  3) Does axis2 has a way to preserve all the logs yet not crash 
due to file size limit? 
	  4) If the answers are NO for all of the above questions, is 
axutil_log_impl_write_to_file() (before the fprintf, line #250)is the 
right place to support either of the above?

Please reply.  

Regards,
~raghav
 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Issues with the log directory

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Raghavendra SM wrote:
>
> Hi All,
>
>  
>
> Axis2C, by default writes the axis2.log file to /logs/ directory. But 
> we need to write the axis2.log to a new directory say, /axis2_log/.
>
> I tried changing the Makefile and Makefile.in as below,
>
>  
>
> logsdir=$(prefix)/logs  # old
>
> logsdir=$(prefix)/axis_logs  #mine
>
>  
>
> With the above changes, the log isn’t getting written to the new path. 
> Are the changes done above are valid and relevent?
>
They are invalid and not relevant. This entry in the make file just 
ensures it creates the default logs folder.
>
> Is there any other configuration that needs to be tuned? Or is it 
> needs to taken care at the code level of axutil?
>
You have to do this at code level. You do not have to modify axutil. 
Rather you have to modify your code where you use Axis2/C.
As an example, please have a look at the init_syetem_env function in 
src/core/transport/http/server/simple_axis2_server/http_server_main.c
This is the main program of simple axis2 server and the given function 
creates the log based on the location given in log_file parameter.
As Milinda mentioned in his reply, make sure you have created the folder 
structure - Axis2/C only creates the file, not the folders.

HTH.

Samisa...
>
> Please reply.
>
>  
>
> P.S: even Makefile.am has logsdir=$(prefix)/logs, which I haven’t 
> changed. Does it matter?
>
>  
>
> Regards,
>
> ~raghav
>
>  
>
>  
>


-- 
Samisa Abeysinghe : WSO2 WSF/C
"http://wso2.org/projects/wsf/c?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework/C&nbsp;-&nbsp;Open&nbsp;source&nbsp;C&nbsp;library&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org