Page MenuHomePhabricator

[web] Add web Logger implementation
ClosedPublic

Authored by kamil on Jul 19 2023, 3:01 AM.
Tags
None
Referenced Files
F2157627: D8548.id29111.diff
Mon, Jul 1, 2:11 AM
F2157580: D8548.diff
Mon, Jul 1, 2:08 AM
Unknown Object (File)
Sat, Jun 29, 5:53 AM
Unknown Object (File)
Wed, Jun 26, 4:05 AM
Unknown Object (File)
Tue, Jun 25, 5:19 PM
Unknown Object (File)
Sun, Jun 23, 5:32 PM
Unknown Object (File)
Fri, Jun 14, 6:01 AM
Unknown Object (File)
Mon, Jun 3, 8:43 PM
Subscribers

Details

Summary

To use the same Logger API we have on native rn.

Not sure what will be the best place to put this file, but I think it's better to separate and avoid adding "web" implementation in native/ directory.

Test Plan
  1. Check if clang format works
  2. Check if Logger works! is visible on worker console

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
web/scripts/run_emscripten.sh
104 ↗(On Diff #28819)

this is hiding file, comment to show

kamil published this revision for review.Jul 19 2023, 8:59 AM
jon added inline comments.
native/cpp/CommonCpp/DatabaseManagers/CommQueryExecutor.cpp
25 ↗(On Diff #28819)

Could make this a bit more contextual.

web/cpp/Logger.cpp
1 ↗(On Diff #28819)

Ideally ../../native/cpp/CommonCpp/ would be in the include path

web/scripts/run_emscripten.sh
86 ↗(On Diff #28819)
104 ↗(On Diff #28819)

to delete the "backup file"

This revision now requires changes to proceed.Jul 19 2023, 12:10 PM

address review

native/cpp/CommonCpp/DatabaseManagers/CommQueryExecutor.cpp
25 ↗(On Diff #28819)

This class will be removed soon anyway, I wanted to show how I tested this, but I'll update this as you suggested

web/cpp/Logger.cpp
1 ↗(On Diff #28819)

Good call - thanks.

I will add Logger.h to avoid updating this at the end of the stack (because that's the way it is included in SQLiteQueryExecutor and #include "Tools/Logger.h" will cause compilation error)

web/scripts/run_emscripten.sh
104 ↗(On Diff #28819)

if I recall correctly you requested to add this to .gitignore and not delete (for some reason), but okay

and by "hiding file" I meant hiding this by Phabricator, it is caused because of the @generated phrase

jon requested changes to this revision.Jul 20 2023, 8:53 AM
jon added inline comments.
web/scripts/run_emscripten.sh
86 ↗(On Diff #28819)

Don't think this was addressed

104 ↗(On Diff #28819)

Either way is fine with me.

This revision now requires changes to proceed.Jul 20 2023, 8:53 AM
kamil requested review of this revision.Jul 20 2023, 9:00 AM
kamil added inline comments.
web/scripts/run_emscripten.sh
86 ↗(On Diff #28819)

explained in https://phab.comm.dev/D8548?id=28819#inline-55010

when I will do it, this line will cause compilation error in D8553

tomek added inline comments.
web/cpp/Logger.cpp
8 ↗(On Diff #28891)

Guess this could be a default implementation but also makes sense to be explicit.

@jon Could you please take a look at this and respond to my comment? The changes you requested are blocking the entire stack

This revision is now accepted and ready to land.Jul 26 2023, 7:29 AM
web/cpp/Logger.cpp
8 ↗(On Diff #28891)

I prefer explicit separation instead of using default - seems more readable

trigger Emscripten pipeline

This revision was automatically updated to reflect the committed changes.