Giter Club home page Giter Club logo

Comments (5)

balupton avatar balupton commented on August 23, 2024

Prior to version 6 we had configuration piping, however it was removed as it was too difficult to reason about and maintain. Much clearer for options to not be inherited and merged, or at least leaving such to userland instead of core where they know the assumptions about merging and inheritance.

Similarly it would be handy if LogEntry could be passed down the pipe then the Browser transform could access LogEntry passed to Human().

This would be a seperate thing, however I think it would also complicate matters as we need the pipes compatible with normal node and deno piping. Perhaps human could extend the log entry rather than convert it, however performance is critical as some apps do thousands of logs in a few seconds, and extensions would still not output the expected result when piping human to say stdout.

from caterpillar.

clibu avatar clibu commented on August 23, 2024

Ok. It is interesting that I've come along after the fact and suggested something that was in place earlier. That would suggest there was and possibly still is a need. However I completely understand your position and am fine to just move on.

I've made extensive changes to copies of Human and Browser to enable all ansi colors and styles to be used everywhere, and along the way simplified the code. However the Browser output is overly noisy as all objects are expanded, which I'm not used to. This makes sense in Node, however in the Browser simpler logging lets the user interactively expand and collapse objects which presents a far more compact (less noisy) output.

So I'm now working at implementing an option for this simpler Browser logging style. However because of the loss of information piped from Human to Browser, it looks like I need to combine the two transforms into one. I'll keep you posted.

Here's my updated Browser output:
image

and this show's all the Log Levels:
image

from caterpillar.

balupton avatar balupton commented on August 23, 2024

The browser transform and the hunan transform could certainly be merged. The plan would be for an ansi package that outputs the style for the browser if in a browser environment. And either the one package does it automatically, or you configure the new human transform with the appropriate config for the environment.

from caterpillar.

clibu avatar clibu commented on August 23, 2024

Yes, I'm using ansicolor which replaces your ansi code. Works a treat.

I now have a combined human and browser module called superHuman 😀 which has target (browser/node) options amongst others. It's coming along nicely.

It can either do the original colored and expanded output or the user expandable compact output like this:

image

from caterpillar.

balupton avatar balupton commented on August 23, 2024

Lookin good

from caterpillar.

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.