Hello Jakob,

May I get some more directions for using the consoleDelegate?
>From d8 files. I saw that we could make a console class and use set 
consoleDelegate to set console functions.
But in our old way, we create a global template for "console" and using 
setAccessor to append functions to it. 
Since I don't want to introduce too much code change. Is there a way to 
keep the old usage (create as global template)? or is using consoleDelegate 
the only way to specify console functions?

Again thank you so much!



On Monday, June 25, 2018 at 10:27:58 PM UTC-7, Jakob Kummerow wrote:
>
> On Mon, Jun 25, 2018 at 8:30 PM zcw <wanzhic...@gmail.com <javascript:>> 
> wrote:
>
>> Thank you so much!
>> I wanted to save the log to a specific file. I tried using the provided 
>> console but couldn't find where it stored the log message.
>>
>
> On a closer look at the code, it seems that you *have to* provide a 
> ConsoleDelegate if you want console.log to do anything.
>  
>
>> And could the ConsoleDelegate work for the release build?
>>
>
> Yes, of course.
>  
>
>> On Monday, June 25, 2018 at 6:14:42 PM UTC-7, Jakob Kummerow wrote:
>>
>>> V8 now provides its own "console" object, with the usual methods 
>>> installed on it. Does it not serve your needs?
>>>
>>> You can override it by providing a ConsoleDelegate via the debug 
>>> interface. The d8 shell (src/d8.cc) provides an example.
>>>
>>> On Mon, Jun 25, 2018 at 5:52 PM zwc <wanzhic...@gmail.com> wrote:
>>>
>>>> Hello, 
>>>> we are working on upgrading v8 from 5.3 to 6.7-lkgr. 
>>>> But I recently found a strange behavior for one global object with name 
>>>> "console".
>>>> In the old version, we have a global object "console" for logging info. 
>>>> But when upgraded to 6.7, the "console"'s callbacks functions won't get 
>>>> called. I tested if I change the name from "console" to something else, it 
>>>> will work as usual. 
>>>> I am feeling like that "console"seems to become a reserved word for the 
>>>> newer version?
>>>> May I know if this is expected? And if true, is there any workaround to 
>>>> overwrite this behavior? we would want to keep our old "console" name.
>>>>
>>>> Thank you so much!
>>>>
>>>> -- 
>>>> -- 
>>>> v8-users mailing list
>>>> v8-u...@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 v8-users+u...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> -- 
>> v8-users mailing list
>> v8-u...@googlegroups.com <javascript:>
>> 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 v8-users+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to