question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timestamp color include AM/PM format

See original GitHub issue

What would you suggest I could do to include AM/PM in color formatting? I have tried to add custom pattern, but it is now helping

"logFileHighlighter.customPatterns": [
    {
      "pattern": "AM",
      "foreground": "#AFF2C5"
    },
    {
      "pattern": "PM",
      "foreground": "#AFF2C5"
    }
]

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
emilastcommented, Nov 12, 2018

\\b matches a word boundary. But I have to confess that I don’t understand how that helps in this case, so I’ll leave that explanation for @HaaLeo 😃

1reaction
HaaLeocommented, Nov 12, 2018

@mikeerickson When a custom pattern consists only of letters it is wrapped before the regex is built (Reference). This built regex does not match ... PM]. However when the custom pattern consitst of characters different than letters (in this case \\) the regex is built directly with the custom pattern without wrapping.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timestamps, Time Zones, Time Ranges, and Date Formats
Learn how Sumo Logic manages timestamps, time zones, time ranges, and dates, and the configuration options that are available.
Read more >
How do you display JavaScript datetime in 12 ... - Stack Overflow
function formatAMPM(date) { var hours = date.getHours(); var minutes = date.getMinutes(); var ampm = hours >= 12 ? 'pm' : 'am'; hours =...
Read more >
Custom Date Formats - Tableau Help
Supported date format symbols ; am/pm, Use the 12-hour clock and display a lowercase AM with any hour before noon; display a lowercase...
Read more >
Format a date and time field - Microsoft Support
The date and time data types have a wide variety of formats to help meet your unique ... The time is displayed as,...
Read more >
Data formats - Material Design
Data formats depict different types of numeric and linguistic data. ... Use a single AM or PM at the end of the range,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found