Page MenuHomePhabricator

[web] Add web Logger implementation
ClosedPublic

Authored by kamil on Jul 19 2023, 3:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 2:33 PM
Unknown Object (File)
Thu, Nov 21, 2:09 AM
Unknown Object (File)
Tue, Nov 12, 11:57 PM
Unknown Object (File)
Thu, Nov 7, 10:22 PM
Unknown Object (File)
Thu, Nov 7, 10:21 PM
Unknown Object (File)
Fri, Nov 1, 3:57 PM
Unknown Object (File)
Oct 26 2024, 1:59 AM
Unknown Object (File)
Sep 28 2024, 11:14 AM
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.