vscode: Sandbox: provide a functional logger that does not depend on spdlog in renderer
Today we require spdlog from the renderer as native module. It is pretty clear that once we enable sandbox, this dependency cannot be met anymore. This issue is to discuss alternatives, some thoughts:
- use shared process for logging (ideal because it would not block the main process)
- just use a file based logger that uses file service (I guess that goes against why
spdlogwas introduced at first)
//cc @deepak1556 @joaomoreno
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (20 by maintainers)
@bpasero Got it! I didn’t know we automatically sent everything to the devtools console, since we have the output channels.
Your proposal makes sense to me. The only difference I see would be that in
console-messagewe’re restricted to strings while in our IPC we can send JSONable objects. But I don’t think that’s a blocker anyway. 👍No hard opinions between shared vs main process, but having a separate IPC would be good.
To clarify: we can keep using
spdlogin all processes except for renderer.@deepak1556 do you have any knowledge about Chrome’s logger? I wonder if we could turn this around and let Electron expose such a logger API from Chrome? I am sure they must have something efficient…