[Libwebsockets] What is the proper way to create log file using libuv and lws ?

Meir Yanovich meiry242 at gmail.com
Mon Jul 25 20:05:07 CEST 2016

Heh sorry 
I just want to make logger 
Simple as append text to file 

‫ב-25 ביולי 2016, בשעה 19:49, ‏‏Andy Green ‏<andy at warmcat.com> כתב/ה:‬

> On July 25, 2016 11:55:04 PM GMT+08:00, Meir Yanovich <meiry242 at gmail.com> wrote:
> Hello all
> I need to log all my request/response to log file .
> based on the libuv example alone :
> https://github.com/thlorenz/libuv-dox/blob/master/examples/02-uvcat/main.c
> although this doesn't work , what is the right way to do it ?

I couldn't get what you are asking from this and the link.

You're asking how to direct all lws logs to libuv logging?

- You can set lws logging to use a custom emit callback with lws_set_log_level() that can do what you like.

"request/response" of what, network serving or filesystem?

- You can get Apache-compatible server logging with LWS_WITH_ACCESS_LOG.

- Filesystem accesses by lws itself go through an ops struct you can hook, see struct lws_plat_file_ops in libwebsockets.h and test-server.c for example how to hook.

None of the above?  Please explain in more detail what you're trying to do and what "doesn't work".


> Thanks
> ------------------------------------------------------------------------
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> http://libwebsockets.org/mailman/listinfo/libwebsockets

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20160725/d8ad3515/attachment-0001.html>

More information about the Libwebsockets mailing list