0

I will test some urls automatically with Chrome on Windows, using parametrized start from CMD. After tests i want to save console.log from each test into own file with meaningful file name.

On passing of --enable-logging --v=1 as start parameter all console.log files are named as chrome_debug.log, so if running multiple tests, they would be named by Windows as chrome_debug.log, chrome_debug.log(1), chrome_debug.log(2)...

How can i name each console-log-file with any meaningful name like a part of tested url? The best possible way would for me to pass kLogFileName as start parameter for each test - if it were possible, something like:

start chrome "site1.com" --enable-logging --v=1 --kLogFileName "site1"

Evgeniy
  • 2,337
  • 2
  • 28
  • 68
  • That filename is hard coded in source code: https://cs.chromium.org/chromium/src/chrome/common/logging_chrome.cc?q=chrome_debug&sq=package:chromium&g=0&l=403 – Asesh Jul 25 '18 at 03:27
  • @Asesh is it not possible to change it, like the path here: https://www.chromium.org/for-testers/enable-logging ? – Evgeniy Jul 25 '18 at 08:42
  • AFAIK, no and I don't see any relevant code in Chromium to do so. If you are using your own fork then just change the name of that file in your source code – Asesh Jul 25 '18 at 08:44
  • its pretty weird, because if saving the console.log with right mouse click, the saved file is named properly, with url and timestamp - and this without to ask anything – Evgeniy Jul 25 '18 at 08:46

0 Answers0