Giter Club home page Giter Club logo

Comments (8)

terehov avatar terehov commented on May 24, 2024 2

@minmur I checked it out and "Oh-My-Zsh" seems to be ignoring or overwriting our styles.

Both on iTerm:

Without "Oh-My-Zsh":
image

With "Oh-My-Zsh":
image

If you have some time, it would be amazing if you could have a look and try to fix it!

Thanks!

from tslog.

minmur avatar minmur commented on May 24, 2024 1

My OS is macOS Catalina. Node version 12.5.0 (via nvm)

I have cleared all my terminal setting to factory level (at least i think so). And still didn't get "true" colors.
Installed iTerm etc and still same. But for example nvm ls result has colors:
image

from tslog.

terehov avatar terehov commented on May 24, 2024

Hi, @minmur thanks for reaching out.
In order to avoid unnecessary dependencies like chalk and further improve our performance, tslog only uses native colors available through Node.js util. Older versions <12 don't support the entire palette and fall-back to black and white.

I guess you are still running an older version and would suggest you to update to the current LTS (12.x) version or even 14.x which is going to become the next LTS in fall.
Does it solve your issue? If it doesn't, I would kindly ask you to provide me with your Node.js and OS versions and re-open this issue. Thanks

cheers

Eugene

from tslog.

terehov avatar terehov commented on May 24, 2024

Thanks. I'll have a look at it.

from tslog.

herbertpan avatar herbertpan commented on May 24, 2024

Hi @terehov
do you have a plan to support metaline color customization?

If I find the correct place, the metaline color is hard coded as gray.

if (concatenatedMetaLine.length > 0) {
      std.write(
        LoggerHelper.styleString(
          ["gray"],
          `[${concatenatedMetaLine}]`,
          this.settings.colorizePrettyLogs
        )
      );

My iterm2 background is gray, so I cannot see metaline. (I have to use colorizePrettyLogs: false)

from tslog.

terehov avatar terehov commented on May 24, 2024

@herbertpan Makes sense. Thank you.
I am going to add it to the V4 release too.

from tslog.

terehov avatar terehov commented on May 24, 2024

Done. V4 beta allows you to template and overwrite all styles, event the meta line.

Have a look at these tests:

Give it a go and let me know if that solves your problem:

  • npm i tslog@next

  • and run it with node --enable-source-maps or for TypeScript node --enable-source-maps --experimental-specifier-resolution=node --no-warnings --loader ts-node/esm

from tslog.

terehov avatar terehov commented on May 24, 2024

V4 is released now, so I'm going to close this issue.
Feel free to open a new one if V4 didn't solve it for you.

from tslog.

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.