Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/logger #267

Merged
merged 263 commits into from
Nov 29, 2023
Merged

Add/logger #267

merged 263 commits into from
Nov 29, 2023

Conversation

joshLong145
Copy link
Collaborator

@joshLong145 joshLong145 commented Nov 25, 2023

  • Adds a new logging package with support for
    • Levels
    • Timing
    • Colors
    • categories
    • TimeStamps
    • Trace Id's
    • forwarding to aggregates for telemetry storage
    • hashing for unique log collection
      Integrated into core by injecting the log manager and a single logger into lit-core by global injection

Examples

Using the LogManager to create a new logger

const logger = LogManager.Instance.get('my-logger-category');

Using the LogManager to set logging levels for all loggers

LogManager.Instance.setLevel(LogLevel.TRACE);

Adding a handler for all loggers

LogManager.setHandler((log) => {
  console.log("new log ", log);
});

Turning hashing support on for all loggers

LogManager.Instance.withConfig({
      "condenseLogs": true
    });

The above can be done on individual loggers for single instance modifications

Next Steps

  • support log levels where we can turn debug option to a log level option for finer grade log support.
  • Add forwarding to central logging aggregate

joshLong145 and others added 15 commits November 19, 2023 14:31
* feat: Store blockhash from handshake + use it in SIWE

* feat: Pass blockhash instead of client in authSig functions

* refac: Cleanup

* feat: Client getter for blockhash + Manual tests

* refac: Remove comments

* refac: latest_blockhash -> latestBlockhash

* test: Display result of manual tests

* test: Node E2E test for creating authSig by fetching the blockhash from the client
Base automatically changed from merge/main-into-v3 to master November 28, 2023 18:55
@CLAassistant
Copy link

CLAassistant commented Nov 29, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
5 out of 7 committers have signed the CLA.

✅ glitch003
✅ joshLong145
✅ Ansonhkg
✅ ericlewis
✅ vmc-crossmint
❌ VoR0220
❌ Adarsh-Kumar28
You have signed the CLA already but the status is still pending? Let us recheck it.

@joshLong145 joshLong145 merged commit bbba0e0 into master Nov 29, 2023
0 of 2 checks passed
@joshLong145 joshLong145 deleted the add/logger branch November 29, 2023 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet