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.

Custom timestampFormat

See original GitHub issue

Hi, I would like to specify a format like HH:mm:ss.SSS, but the TypeScript compiler will complain, because it’s not one of the predefined formats like ‘short’, ‘medium’, ‘long’, etc. Is it possible to add the option to provide a custom format (like we can with the Angular date pipe)?

BTW, this will work, but it’s not a very clean solution:

        LoggerModule.forRoot({
            serverLogLevel: NgxLoggerLevel.OFF,
            // @ts-ignore
            timestampFormat: 'HH:mm:ss.SSS'
        })

Thanks!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
qortexcommented, Apr 2, 2020

Aw right! I didn’t see the custom options when I did this PR. The type shouldn’t be restricted and all strings should be allowed.

I will submit a PR to fix it, sorry about that.

0reactions
klemenszcommented, Apr 23, 2020

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timestamps, Time Zones, Time Ranges, and Date Formats
Configure a custom timestamp format for your Source. The Collector assumes that all log messages coming from a particular Source will have timestamps...
Read more >
Apache Spark: Reading CSV Using Custom Timestamp Format
Learn about how to correct a timestamp formatting issue that occurs when reading CSV in Spark for any version of Spark.
Read more >
Apache Spark: Reading csv using custom timestamp format
In this blog, we are considering a situation where I wanted to read a CSV through spark, but the CSV contains some timestamp...
Read more >
How to load CSVs with timestamps in custom format?
Use schema inference in CSV using inferSchema option with your custom timestampFormat . It's important to trigger schema inference using ...
Read more >
Flat Files with Custom Date/Time/Timestamp Formatted Data
QuerySurge and Custom Date/Time/Timestamp Formats in Flat Files Often, in setting up a Flat File Connection in QuerySurge, custom...
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