Roman Arutyunyan
September 27, 2019 07:06AM
On Fri, Sep 27, 2019 at 06:51:12AM -0400, astre wrote:
> Thanks Roman, it is working. Is there a way to directly print using
> std::cout instead of ngx_log_* functions ?
> P.S: I'm writing module in C++.

You can use string length in the 'len' field to limit the number of characters
printed. There are many ways to do that, for example:

std::cout.write(r->uri.data, r->uri.len);

>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,285729,285731#msg-285731
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

PS: it is better to ask development questions in the nginx-devel mailing list:
http://mailman.nginx.org/mailman/listinfo/nginx-devel

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

understanding ngx_str_t structure

astre September 27, 2019 05:44AM

Re: understanding ngx_str_t structure

Roman Arutyunyan September 27, 2019 06:16AM

Re: understanding ngx_str_t structure

astre September 27, 2019 06:51AM

Re: understanding ngx_str_t structure

Roman Arutyunyan September 27, 2019 07:06AM

Re: understanding ngx_str_t structure

astre September 27, 2019 07:17AM

Re: understanding ngx_str_t structure

Roman Arutyunyan September 27, 2019 07:32AM

Re: understanding ngx_str_t structure

astre September 27, 2019 07:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready