Save chrome console logs to a file.

1,204 views
Skip to first unread message

Shiv Anand

unread,
Nov 2, 2016, 4:02:31 AM11/2/16
to Chromium-discuss
Hi, 

I have a web application that logs data into console. Now this contains javascript objects and https requests and responses. What I need is a mechanism or way in which I can save the logs from this web application only and save it into a file. I did look at --enable-logging switch but then it is logging everything in the file which seems irrelevant for my needs. Also it would be great if there is a library that I can use to save the logs to a file programmatically.

Help appreciated. 

Thanks
Shiv

PhistucK

unread,
Nov 2, 2016, 4:05:29 AM11/2/16
to shivanan...@gmail.com, Chromium-discuss
I have not heard of an existing one.
However, if you prefix all of your log lines with some identifiable string (console.log("my-application-20161102", log)), it should be pretty easy to filter.


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Primiano Tucci

unread,
Nov 2, 2016, 7:18:36 AM11/2/16
to shivanan...@gmail.com, Chromium-discuss
My best suggestion is:
1a) Create a chrome extension that uses the https://developer.chrome.com/extensions/debugger API
OR
1b) Start chrome with --remote-debugging-port=1234 and talk directly to the remote debugging protocol socket

AND

2) use that to access the Log API via the chrome remote debugging protocol.


--
Reply all
Reply to author
Forward
0 new messages