Code Monkey home page Code Monkey logo

Comments (10)

NachoVazquez avatar NachoVazquez commented on August 10, 2024 1

Sorry, @santoshyadavdev I missed this notification. Go ahead with this idea POC. :)

from lumberjack.

LayZeeDK avatar LayZeeDK commented on August 10, 2024 1

@pBouillon

The partial implementation suggested doesn't quite make sense since scope isn't known in this example. This is something work discussing. Should log scope be part of this API?

I'm still new to the process, what do you mean by drafting and testing this?

I mean feel free to start writing code, tests, documentation, and design documents and we will help you rework your contribution after the framework-agnostic release of Lumberjack.

Should I wait for the v16 and suggest changes then, based on the rework or write what the API might look like

You can get started on the Angular API for now. We will need to adapt it to the framework-agnostic package, @lumberjackjs/core, after the framework-agnostic release.

without referencing inject since it is Angular-related?

We will still have Angular-specific packages:

  • @lumberjackjs/angular
  • @lumberjackjs/angular-http-driver

from lumberjack.

santoshyadavdev avatar santoshyadavdev commented on August 10, 2024

Do we need to create a new service, or can we expose the functions?

WDYT @LayZeeDK @NachoVazquez

we can do logCritical(params) {
const service = inject(LoggerService).log()
}

from lumberjack.

NachoVazquez avatar NachoVazquez commented on August 10, 2024

I don't completely follow. Could you describe the usage API?

from lumberjack.

santoshyadavdev avatar santoshyadavdev commented on August 10, 2024

The API will look like

export function logCritical(message: string, payload: LumberjackLogPayload) {
  return inject(LumberjackService).log({
    message: message,
    payload: payload,
    level: LumberjackLevel.Critical,
    createdAt: Date.now(),
    scope: 'Forest App',
  });
}

And we can use it like below.

logCritical('The forest is on fire', { angularVersion: VERSION.full })

from lumberjack.

NachoVazquez avatar NachoVazquez commented on August 10, 2024

I think that's interesting. We could definitely iterate over the idea.

Good thoughts

from lumberjack.

santoshyadavdev avatar santoshyadavdev commented on August 10, 2024

Great, should I try to create a POC and open a PR with this idea? Or do we want to go with Services in the first iteration?

from lumberjack.

pBouillon avatar pBouillon commented on August 10, 2024

Hey! Is this issue still open? I'd like to help and looking for a starting point 😄

from lumberjack.

LayZeeDK avatar LayZeeDK commented on August 10, 2024

Hi @pBouillon

Yes, this is still open and relevant. We are currently working on a major rework of Lumberjack to make it framework-agnostic (see #166) so we won't accept any features or publish new feature releases before that work is done. But please feel free to draft design documents, implementation, and tests for this feature and we can iterate over it after the breaking changes and package expansion.

from lumberjack.

pBouillon avatar pBouillon commented on August 10, 2024

I'm still new to the process, what do you mean by drafting and testing this? Should I wait for the v16 and suggest changes then, based on the rework or write what the API might look like, if not what @santoshyadavdev already suggested but without referencing inject since it is Angular-related?

On a side note, this is a huge refacto, good luck! 🙌

from lumberjack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.