0

could anybody tell me how to change logging in the C version of diffusion? By default its set to maximum from what I can see. At startup my executable logs and logs to stdout/stderr, fails to respond to the diffusion servers ping and just ends up hanging.

If I redirect stdout/stderr to a file, my executable starts in a timely manner, responds to the ping and everything runs perfectly. This is obviously not a viable solution.

Could anybody tell me how to disable/change the log level programmatically and/or by configuration? Again, its the C version of diffusion I'm runing.

Thanks much

Graham

user3613174
  • 669
  • 1
  • 7
  • 13
  • The Diffusion C client doesn't have logging or a logging configuration. Can you show an example of the messages to stdout/stderr that you're experiencing? – dimejio Dec 19 '18 at 17:17
  • Hi, Sure, no problem. In the end it was the websockets layer (on top of which the C libs are built). POOL DEBUG: [PID/TID] ACTION (SIZE /POOL SIZE /TOTAL SIZE) POOL "TAG" <__FILE__:__LINE__> (ALLOCS/TOTAL ALLOCS/CLEARS) POOL DEBUG: [10752/516] GLOBAL 0xcb7c88 POOL DEBUG: [10752/516] CREATE ( 0/ 0/ 148) 0xcbcb50 "misc\win32\start.c:194" (0/0/0) – user3613174 Jan 04 '19 at 12:45
  • Yes, as you've correctly stated in your answer, the build you were using is the debug build of Diffusion's C client on Windows. The release build doesn't have this logging and should be the build to use for development. – dimejio Jan 07 '19 at 11:21

1 Answers1

2

In the end I found what it was...

The C version of Diffusion is built on top of web sockets. The debug release of diffusion for C has logging set to max for the web sockets layer. The problem doesn't exist for release builds.

I worked around the issue in debug mode by rediecting stdout/stderr to a file, thereby avoiding a ping timeout from the diffusion server.

Example trace output from the debug websockets stuff....

POOL DEBUG: [10752/516] PALLOC (88/ 88/ 356) 0xcb78f8 "session:_root_pool" (3/3/0) POOL DEBUG: [10752/516] PALLOC (104/ 104/ 372) 0xcb78f8 "session:_root_pool" (4/4/0) POOL DEBUG: [10752/516] PALLOC (140/ 140/ 408) 0xcb78f8 "session:_root_pool" (5/5/0) POOL DEBUG: [10752/516] PALLOC (156/ 156/ 424) 0xcb78f8 "session:_root_pool" (6/6/0) POOL DEBUG: [10752/516] PALLOC (192/ 192/ 460) 0xcb78f8 "session:_root_pool" (7/7/0) POOL DEBUG: [10752/516] PALLOC (208/ 208/ 476) 0xcb78f8 "session:_root_pool" (8/8/0) POOL DEBUG: [10752/516] PCALLOC (252/ 252/ 520) 0xcb78f8 "session:_root_pool" (9/9/0) POOL DEBUG: [10752/516] PALLOC (268/ 268/ 536) 0xcb78f8 "session:_root_pool" (10/10/0)

Hope this helps somebody else out somewhere along the road...

Cheers

Graham WALSH

user3613174
  • 669
  • 1
  • 7
  • 13