Comments (8)
@minmur I checked it out and "Oh-My-Zsh" seems to be ignoring or overwriting our styles.
Both on iTerm:
If you have some time, it would be amazing if you could have a look and try to fix it!
Thanks!
from tslog.
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:
from tslog.
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.
Thanks. I'll have a look at it.
from tslog.
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.
@herbertpan Makes sense. Thank you.
I am going to add it to the V4 release too.
from tslog.
Done. V4 beta allows you to template and overwrite all styles, event the meta line.
Have a look at these tests:
-
Styles:
https://github.com/fullstack-build/tslog/blob/v4/tests/Nodejs/9_pretty_Styles.test.ts -
Templates:
https://github.com/fullstack-build/tslog/blob/v4/tests/Nodejs/7_pretty_Settings.test.ts#L127
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 TypeScriptnode --enable-source-maps --experimental-specifier-resolution=node --no-warnings --loader ts-node/esm
from tslog.
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)
- attachTransport to have the formatted string only HOT 2
- Bug: Cannot log URLs HOT 2
- Question about filepaths HOT 1
- Bug: [BUG]mongodb 4.0.3 shard duplicate key error log failed HOT 3
- Bug: Build output not respecting file extensions in import statements HOT 2
- Feature Request: please bring back log level name constructor where minLevel takes a string
- Bug: "hostname" is not exported by "__vite-browser-external", HOT 11
- Documentation: README.md suggest a broken way to extend `BaseLogger` HOT 7
- Feature Request: [Type the json param of the transportJSON function]
- Customizing field names for arguments using `type:json` HOT 1
- Bug: [BUG] Getting Control Characters in browser (FF and Chrome) HOT 3
- Feature Request: Print objects to console without expanding them. HOT 2
- Feature Request: [Feature] HOT 4
- Bug: [BUG] Inspect Polyfill Does Not Gracefully Handle Invalid Dates HOT 3
- Question - CommonJS with TypeScript 5.x and tslog HOT 2
- Bug: interface is missing optional hostname HOT 2
- Bug: TypeError when logging GraphQLError
- Bug: Logging custom objects causes BSONError - console.log works fine HOT 4
- Tauri Webview do not show a correct format HOT 2
- Bug: Custom logger report calls from customer logger file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tslog.