Unable to log to chrome_debug.log in headless mode

2,404 views
Skip to first unread message

pvad...@gmail.com

unread,
Apr 12, 2018, 7:52:51 AM4/12/18
to headless-dev
Hi all,

I am trying to use the "--enable-logging" flag along with "--headless" flag. It turns out that whenever I turn on the headless mode the logs are always being redirected to stdout instead of the default "console_debug.log". Is anyone aware of this problem and can you suggest alternatives? 

Please let me know.

Thanks,
Phani

Eric Seckler

unread,
Apr 12, 2018, 11:57:34 AM4/12/18
to pvad...@gmail.com, headless-dev
We're implementing the handling of --enable-logging, so theoretically what you're trying should work. You'll have to provide a file name though, e.g. "--enable-logging=console_debug.log". Feel free to file a bug if that doesn't work.

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/667d05df-1bc1-4dab-9fd6-58834990edb5%40chromium.org.

Eric Seckler

unread,
Apr 12, 2018, 11:59:28 AM4/12/18
to pvad...@gmail.com, headless-dev
Actually, my bad - it should also log to a file (in addition to stderr) if you don't provide a file name. It might be located in a different directory though, not entirely sure where that's by default.

Phani Vadrevu

unread,
Apr 12, 2018, 12:43:06 PM4/12/18
to Eric Seckler, headless-dev
Yes, these logs are simply in the same directory where the binary file is located. I was expecting to find the log file in user-data-dir and that is what got me confused. Thanks for the help!

On 12 April 2018 at 11:59, Eric Seckler <esec...@chromium.org> wrote:
Actually, my bad - it should also log to a file (in addition to stderr) if you don't provide a file name. It might be located in a different directory though, not entirely sure where that's by default.
On Thu, Apr 12, 2018 at 4:57 PM Eric Seckler <esec...@chromium.org> wrote:
We're implementing the handling of --enable-logging, so theoretically what you're trying should work. You'll have to provide a file name though, e.g. "--enable-logging=console_debug.log". Feel free to file a bug if that doesn't work.
On Thu, Apr 12, 2018 at 12:52 PM <pvad...@gmail.com> wrote:
Hi all,

I am trying to use the "--enable-logging" flag along with "--headless" flag. It turns out that whenever I turn on the headless mode the logs are always being redirected to stdout instead of the default "console_debug.log". Is anyone aware of this problem and can you suggest alternatives? 

Please let me know.

Thanks,
Phani

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

Sami Kyostila

unread,
Apr 20, 2018, 8:45:22 PM4/20/18
to Phani Vadrevu, Eric Seckler, headless-dev
Logging was recently fixed to match the behavior of non-headless Chrome, so you should find the log file in expected location.

- Sami

to 12. huhtik. 2018 klo 17.43 Phani Vadrevu <pvad...@gmail.com> kirjoitti:
Yes, these logs are simply in the same directory where the binary file is located. I was expecting to find the log file in user-data-dir and that is what got me confused. Thanks for the help!
On 12 April 2018 at 11:59, Eric Seckler <esec...@chromium.org> wrote:
Actually, my bad - it should also log to a file (in addition to stderr) if you don't provide a file name. It might be located in a different directory though, not entirely sure where that's by default.
On Thu, Apr 12, 2018 at 4:57 PM Eric Seckler <esec...@chromium.org> wrote:
We're implementing the handling of --enable-logging, so theoretically what you're trying should work. You'll have to provide a file name though, e.g. "--enable-logging=console_debug.log". Feel free to file a bug if that doesn't work.
On Thu, Apr 12, 2018 at 12:52 PM <pvad...@gmail.com> wrote:
Hi all,

I am trying to use the "--enable-logging" flag along with "--headless" flag. It turns out that whenever I turn on the headless mode the logs are always being redirected to stdout instead of the default "console_debug.log". Is anyone aware of this problem and can you suggest alternatives? 

Please let me know.

Thanks,
Phani

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

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

To post to this group, send email to headle...@chromium.org.
Reply all
Reply to author
Forward
0 new messages