Page MenuHomePhabricator

[web] Add web Logger implementation
ClosedPublic

Authored by kamil on Jul 19 2023, 3:01 AM.
Tags
None
Referenced Files
F3177015: D8548.id.diff
Thu, Nov 7, 10:21 PM
Unknown Object (File)
Fri, Nov 1, 3:57 PM
Unknown Object (File)
Sat, Oct 26, 1:59 AM
Unknown Object (File)
Sep 28 2024, 11:14 AM
Unknown Object (File)
Sep 28 2024, 1:54 AM
Unknown Object (File)
Sep 28 2024, 1:54 AM
Unknown Object (File)
Sep 28 2024, 1:50 AM
Unknown Object (File)
Sep 27 2024, 4:50 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
Branch
wasm-publish
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
web/scripts/run_emscripten.sh
104

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

Could make this a bit more contextual.

web/cpp/Logger.cpp
1

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

web/scripts/run_emscripten.sh
86
104

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

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

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

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

Don't think this was addressed

104

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

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.