[v8-users] Re: v8 console.log() help please

2019-02-06 Thread Gerry Sweeney
For anyone that is interested, I have managed to achieve what I want. I will be the first to declare its unelegant, but it does work. The basic approach I have taken is to create my own implementation of console.log() as was suggested by others, by doing the following. I would add, I would ha

Re: [v8-users] Re: v8 console.log() help please

2019-02-06 Thread Gerry Sweeney
Thanks for the pointer, it also seems to require ebug::SetConsoleDelegate( isolate, &console); which is also not public. D8Console console(isolate); debug::SetConsoleDelegate(isolate, &console); I am starting to get the picture now if I don't want to resort to modifying the v8 library I cannot a

Re: [v8-users] Re: v8 console.log() help please

2019-02-05 Thread Caitlin Potter
The public interface is V8InspectorImpl, but it probably requires more effort than ConsoleDelegate itself. d8 gets away with not using it, in favor of the non-public api. > On Feb 5, 2019, at 11:26 AM, Gerry Sweeney wrote: > > Hi Caitlin, > > Thanks for the insight, I cannot find a public int

Re: [v8-users] Re: v8 console.log() help please

2019-02-05 Thread Jakob Kummerow
You can look at d8's console implementation for an example of how the built-in console.log can be hooked up. The ConsoleDelegate implementation is in src/d8-console .{h,cc}, and it's hooked up like so

Re: [v8-users] Re: v8 console.log() help please

2019-02-05 Thread Gerry Sweeney
Hi Jeremy, Thanks for your suggestion, that's looking like the easiest thing to do at this point. Its a shame the default one is not exposed in the basic API, it seems like such an obvious requirement, but re-inventing the wheel is good too :) I really like the V8 engine, but its C++ leaves a

Re: [v8-users] Re: v8 console.log() help please

2019-02-05 Thread Gerry Sweeney
Hi Caitlin, Thanks for the insight, I cannot find a public interface for debug::SetConsoleDelegate() so I guess that's not an option. I guess I could look at the inspector API and see what I can find there. Right now I think I am favoring the simplicity of the other suggestion to just roll

Re: [v8-users] Re: v8 console.log() help please

2019-02-05 Thread 'Jeremy Bettis' via v8-users
I have found the easiest thing is to delete the built in console (global->Delete) and then add your own. Setting the console delegate requires using the inspector API and is harder. On Tue, Feb 5, 2019, 8:12 AM > > > On Feb 5, 2019, at 10:02 AM, Gerry Sweeney wrote: > > > > Hello Caitlin, > > >

Re: [v8-users] Re: v8 console.log() help please

2019-02-05 Thread caitp
> On Feb 5, 2019, at 10:02 AM, Gerry Sweeney wrote: > > Hello Caitlin, > > First of all, thank you for your response, and yes you are right I should > have been far clearer in my question, please let me clarify. > > I have a process, is an x64 C++ application that normally runs as a Windo

[v8-users] Re: v8 console.log() help please

2019-02-05 Thread Gerry Sweeney
I should have also clarified that when I write console.log("Hello, world") I do not see any output on the stdout (which I expected), what I am looking for is a way in C++ to get to this stream so I can sends its output somewhere. Thanks Gerry -- -- v8-users mailing list v8-users@googlegroup

[v8-users] Re: v8 console.log() help please

2019-02-05 Thread Gerry Sweeney
Hello Caitlin, First of all, thank you for your response, and yes you are right I should have been far clearer in my question, please let me clarify. I have a process, is an x64 C++ application that normally runs as a Windows service or a Linux Deamon, its job is to provide a way for our user

[v8-users] Re: v8 console.log() help please

2019-02-05 Thread Caitlin Potter
Hi, I have several questions to provide context, so that you might get more help. Does "I cannot see anything on the stdout of the process that is running the v8 engine" mean that you are spawning 1 or more child processes in your application? If so, how are you spawning them? Also, which cons

[v8-users] Re: v8 console.log() help please

2019-02-05 Thread Gerry Sweeney
can anyone assist? -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to