You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ricardo13 <ri...@gmail.com> on 2009/06/12 21:02:11 UTC
[users@httpd] mod_log_config
Hi,
I'm testing the mod_log_config.
I did a simple program to read stardard input. Called program.c
#include <stdio.h>
int main() {
char input[BUFSIZ];
while(fgets(input, BUFSIZ, stdin) != NULL)
printf("Value: %s\n", input);
return 0;
}
I configured httpd.conf to send information log to this program.
LogFormat "%D" common
CustomLog "|/usr/local/apache2/program" common
But When I request a page doesn't show "Value: 1234" in the prompt, for
example.
What's wrong ?? Anyone has a example ??
Thanks
Ricardo
--
View this message in context: http://www.nabble.com/mod_log_config-tp24004505p24004505.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_log_config
Posted by ricardo figueiredo <ri...@gmail.com>.
Hi,
How do I modified mod_log_config to write log only in a row ??? Instead
append log in file.
Thank you
Ricardo
On Mon, Jun 15, 2009 at 11:22 AM, ricardo figueiredo <
ricardoogrande@gmail.com> wrote:
> ok Eric,
>
> One more time: Thank you
>
> Ricardo
>
>
> On Mon, Jun 15, 2009 at 11:19 AM, Eric Covener <co...@gmail.com> wrote:
>
>> On Mon, Jun 15, 2009 at 9:50 AM, ricardo
>> figueiredo<ri...@gmail.com> wrote:
>> > Hi,
>> >
>> > How do I compile Apache with mod_log_config like DSO ???
>> >
>> > I compiled Apache like this:
>> > ./configure --enable-proxy --enable-rewrite
>>
>> ./configure --help | grep shared or read the INSTALL file.
>>
>> --
>> Eric Covener
>> covener@gmail.com
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --
> Muito Obrigado
>
> Ricardo
>
--
Muito Obrigado
Ricardo
Re: [users@httpd] mod_log_config
Posted by ricardo figueiredo <ri...@gmail.com>.
ok Eric,
One more time: Thank you
Ricardo
On Mon, Jun 15, 2009 at 11:19 AM, Eric Covener <co...@gmail.com> wrote:
> On Mon, Jun 15, 2009 at 9:50 AM, ricardo
> figueiredo<ri...@gmail.com> wrote:
> > Hi,
> >
> > How do I compile Apache with mod_log_config like DSO ???
> >
> > I compiled Apache like this:
> > ./configure --enable-proxy --enable-rewrite
>
> ./configure --help | grep shared or read the INSTALL file.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
Muito Obrigado
Ricardo
Re: [users@httpd] mod_log_config
Posted by Eric Covener <co...@gmail.com>.
On Mon, Jun 15, 2009 at 9:50 AM, ricardo
figueiredo<ri...@gmail.com> wrote:
> Hi,
>
> How do I compile Apache with mod_log_config like DSO ???
>
> I compiled Apache like this:
> ./configure --enable-proxy --enable-rewrite
./configure --help | grep shared or read the INSTALL file.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_log_config
Posted by ricardo figueiredo <ri...@gmail.com>.
Hi,
How do I compile Apache with mod_log_config like DSO ???
I compiled Apache like this:
./configure --enable-proxy --enable-rewrite
Thank you
Ricardo
On Mon, Jun 15, 2009 at 10:32 AM, Eric Covener <co...@gmail.com> wrote:
> On Mon, Jun 15, 2009 at 9:18 AM, ricardo
> figueiredo<ri...@gmail.com> wrote:
> > Hi,
> >
> > I gave up !!! It's very difficult !!!!
> >
> > Now, I would like know: "How do I compile a module built-in ??"
> >
> > Because, I modified the mod_log_config and compiled (apxs -a -i -c
> > mod_log_config.c). After, I started Apache and shows this:
> > "httpd: Syntax error on line 56 of /usr/local/apache2/conf/httpd.conf:
> > module log_config_module is built-in and can't be loaded".
>
>
> You can't. Rebuild all of Apache with your changes, or rebuild all of
> apache so some of your modules are DSO's so they can be replaced.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
Muito Obrigado
Ricardo
Re: [users@httpd] mod_log_config
Posted by Eric Covener <co...@gmail.com>.
On Mon, Jun 15, 2009 at 9:18 AM, ricardo
figueiredo<ri...@gmail.com> wrote:
> Hi,
>
> I gave up !!! It's very difficult !!!!
>
> Now, I would like know: "How do I compile a module built-in ??"
>
> Because, I modified the mod_log_config and compiled (apxs -a -i -c
> mod_log_config.c). After, I started Apache and shows this:
> "httpd: Syntax error on line 56 of /usr/local/apache2/conf/httpd.conf:
> module log_config_module is built-in and can't be loaded".
You can't. Rebuild all of Apache with your changes, or rebuild all of
apache so some of your modules are DSO's so they can be replaced.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_log_config
Posted by ricardo figueiredo <ri...@gmail.com>.
Hi,
I gave up !!! It's very difficult !!!!
Now, I would like know: "How do I compile a module built-in ??"
Because, I modified the mod_log_config and compiled (apxs -a -i -c
mod_log_config.c). After, I started Apache and shows this:
"httpd: Syntax error on line 56 of /usr/local/apache2/conf/httpd.conf:
module log_config_module is built-in and can't be loaded".
Thank you
Ricardo
On Fri, Jun 12, 2009 at 10:57 PM, Eric Covener <co...@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 5:45 PM, ricardo
> figueiredo<ri...@gmail.com> wrote:
> > double d;
>
> > fscanf(stdin, "%f", d);
>
> Try testing this on the command line before you try to test it
> integrated into apache. Shouldn't the final parameter be a pointer?
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
Muito Obrigado
Ricardo
Re: [users@httpd] mod_log_config
Posted by Eric Covener <co...@gmail.com>.
On Fri, Jun 12, 2009 at 5:45 PM, ricardo
figueiredo<ri...@gmail.com> wrote:
> double d;
> fscanf(stdin, "%f", d);
Try testing this on the command line before you try to test it
integrated into apache. Shouldn't the final parameter be a pointer?
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_log_config
Posted by ricardo figueiredo <ri...@gmail.com>.
On Fri, Jun 12, 2009 at 6:37 PM, Eric Covener <co...@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 3:45 PM, ricardo
> figueiredo<ri...@gmail.com> wrote:
> >>>> >
> >>>> > But When I request a page doesn't show "Value: 1234" in the prompt,
> >>>> > for
> >>>> > example.
> >>>> > What's wrong ?? Anyone has a example ??
> >>>>
> >>>> Where does standard out from a piped logger go? Try writing to a
> file.
> >
> > Sorry, but don't understand !!! Do mod_log_config writes to a
> file
> > ?? Or program writes ??
>
> Apache writes to your piped logger, your piped logger has to decide
> where to write its output. Writing it to stdout isn't a good idea.
I changed the program and doesn't write in file.
#include <stdio.h>
int main(int argc, char *argv[] ) {
double d;
FILE *f;
f = fopen("plan.txt", "a");
while(1) {
fscanf(stdin, "%f", d);
fprintf(f, "%f\n", d);
}
return 0;
}
Thank you
Ricardo
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
Muito Obrigado
Ricardo
Re: [users@httpd] mod_log_config
Posted by Eric Covener <co...@gmail.com>.
On Fri, Jun 12, 2009 at 3:45 PM, ricardo
figueiredo<ri...@gmail.com> wrote:
>>>> >
>>>> > But When I request a page doesn't show "Value: 1234" in the prompt,
>>>> > for
>>>> > example.
>>>> > What's wrong ?? Anyone has a example ??
>>>>
>>>> Where does standard out from a piped logger go? Try writing to a file.
>
> Sorry, but don't understand !!! Do mod_log_config writes to a file
> ?? Or program writes ??
Apache writes to your piped logger, your piped logger has to decide
where to write its output. Writing it to stdout isn't a good idea.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_log_config
Posted by ricardo figueiredo <ri...@gmail.com>.
>
>
>>
>> On Fri, Jun 12, 2009 at 4:09 PM, Eric Covener <co...@gmail.com> wrote:
>>
>>> On Fri, Jun 12, 2009 at 3:02 PM, ricardo13<ri...@gmail.com>
>>> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I'm testing the mod_log_config.
>>> >
>>> > I did a simple program to read stardard input. Called program.c
>>> >
>>> > #include <stdio.h>
>>> > int main() {
>>> > char input[BUFSIZ];
>>> >
>>> > while(fgets(input, BUFSIZ, stdin) != NULL)
>>> > printf("Value: %s\n", input);
>>> > return 0;
>>> > }
>>> >
>>> > I configured httpd.conf to send information log to this program.
>>> >
>>> > LogFormat "%D" common
>>> > CustomLog "|/usr/local/apache2/program" common
>>> >
>>> > But When I request a page doesn't show "Value: 1234" in the prompt, for
>>> > example.
>>> > What's wrong ?? Anyone has a example ??
>>>
>>> Where does standard out from a piped logger go? Try writing to a file.
>>
>> Sorry, but don't understand !!! Do mod_log_config writes to a
file ?? Or program writes ??
Ricardo
>
>>>
>>> --
>>> Eric Covener
>>> covener@gmail.com
>>>
>>> ---------------------------------------------------------------------
>>> The official User-To-User support forum of the Apache HTTP Server
>>> Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>
>>
>> --
>> Muito Obrigado
>>
>> Ricardo
>>
>
>
>
> --
> Muito Obrigado
>
> Ricardo
>
--
Muito Obrigado
Ricardo
Re: [users@httpd] mod_log_config
Posted by ricardo figueiredo <ri...@gmail.com>.
Hi
CustomLog "logs/default_log|/usr/local/apache2/program" common
Excuse my stupidity. Now, I understood.
How do I compile mod_log_config ? I modified a parameter.
Thank you
Ricardo
On Fri, Jun 12, 2009 at 4:17 PM, ricardo figueiredo <
ricardoogrande@gmail.com> wrote:
> Hi,
>
> When I configured only file apache works.
> CustomLog logs/default_log common
>
> Now, I configured:
> CustomLog "logs/default_log|/usr/local/apache2/program" common
> and Apache doesn't work.
>
> Thank you
> Ricardo
>
>
> On Fri, Jun 12, 2009 at 4:09 PM, Eric Covener <co...@gmail.com> wrote:
>
>> On Fri, Jun 12, 2009 at 3:02 PM, ricardo13<ri...@gmail.com>
>> wrote:
>> >
>> > Hi,
>> >
>> > I'm testing the mod_log_config.
>> >
>> > I did a simple program to read stardard input. Called program.c
>> >
>> > #include <stdio.h>
>> > int main() {
>> > char input[BUFSIZ];
>> >
>> > while(fgets(input, BUFSIZ, stdin) != NULL)
>> > printf("Value: %s\n", input);
>> > return 0;
>> > }
>> >
>> > I configured httpd.conf to send information log to this program.
>> >
>> > LogFormat "%D" common
>> > CustomLog "|/usr/local/apache2/program" common
>> >
>> > But When I request a page doesn't show "Value: 1234" in the prompt, for
>> > example.
>> > What's wrong ?? Anyone has a example ??
>>
>> Where does standard out from a piped logger go? Try writing to a file.
>>
>> --
>> Eric Covener
>> covener@gmail.com
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --
> Muito Obrigado
>
> Ricardo
>
--
Muito Obrigado
Ricardo
Re: [users@httpd] mod_log_config
Posted by ricardo figueiredo <ri...@gmail.com>.
Hi,
When I configured only file apache works.
CustomLog logs/default_log common
Now, I configured:
CustomLog "logs/default_log|/usr/local/apache2/program" common
and Apache doesn't work.
Thank you
Ricardo
On Fri, Jun 12, 2009 at 4:09 PM, Eric Covener <co...@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 3:02 PM, ricardo13<ri...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I'm testing the mod_log_config.
> >
> > I did a simple program to read stardard input. Called program.c
> >
> > #include <stdio.h>
> > int main() {
> > char input[BUFSIZ];
> >
> > while(fgets(input, BUFSIZ, stdin) != NULL)
> > printf("Value: %s\n", input);
> > return 0;
> > }
> >
> > I configured httpd.conf to send information log to this program.
> >
> > LogFormat "%D" common
> > CustomLog "|/usr/local/apache2/program" common
> >
> > But When I request a page doesn't show "Value: 1234" in the prompt, for
> > example.
> > What's wrong ?? Anyone has a example ??
>
> Where does standard out from a piped logger go? Try writing to a file.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
Muito Obrigado
Ricardo
Re: [users@httpd] mod_log_config
Posted by Eric Covener <co...@gmail.com>.
On Fri, Jun 12, 2009 at 3:02 PM, ricardo13<ri...@gmail.com> wrote:
>
> Hi,
>
> I'm testing the mod_log_config.
>
> I did a simple program to read stardard input. Called program.c
>
> #include <stdio.h>
> int main() {
> char input[BUFSIZ];
>
> while(fgets(input, BUFSIZ, stdin) != NULL)
> printf("Value: %s\n", input);
> return 0;
> }
>
> I configured httpd.conf to send information log to this program.
>
> LogFormat "%D" common
> CustomLog "|/usr/local/apache2/program" common
>
> But When I request a page doesn't show "Value: 1234" in the prompt, for
> example.
> What's wrong ?? Anyone has a example ??
Where does standard out from a piped logger go? Try writing to a file.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org