-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExtentSparkReporter. Change format of TIMESTAMP field #430
Comments
Hey, |
Hi All, I've investigated the issue reported in comment1 and have some insights to share:
private Date timestamp = Calendar.getInstance().getTime();
<td>${log.timestamp?time?string}</td> To change the format to "hh:mm:ss.SSS a", replace it as follows: <td>${log.timestamp?time?string("format")}</td> This is my hypothesis after modification will update the format in which the timestamp is displayed in the logs. I will test and update everything in the next comment. |
Hi @TripleG, I have made changes to the code and found that my earlier hypothesis was correct. Here is a screenshot of the results. Here is the screenshot of how it looks without changing the CSS values. I have two methods; one is hardcoded and the other method involves creating a variable in the package The First Method is shown above comment. Second Method: @Builder.Default
private String timeFormat = "hh:mm:ss a"; and you have to change it in these files also.
timeFormat=config.timeFormat
<td>${log.timestamp?time?string["${timeFormat}"]}</td> But I discovered why the owner kept the format as default format - it looks neat and clean. @anshooarora could you please confirm this issue, so that the issue can be closed? Thanks, Kamalesh. |
I want to change the format of the
TIMESTAMP
field to include milliseconds as well.I tried
But the timestamp format does not change:
![image](https://private-user-images.githubusercontent.com/13597473/311440671-bb6e6df6-784f-48f9-adc6-3950d5b6308f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODc0OTksIm5iZiI6MTczOTI4NzE5OSwicGF0aCI6Ii8xMzU5NzQ3My8zMTE0NDA2NzEtYmI2ZTZkZjYtNzg0Zi00OGY5LWFkYzYtMzk1MGQ1YjYzMDhmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE1MTk1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhODU2ZDc0NDZlZTdkZjljODRjOTZiZjcyMGExNTdmNDI3MjllNDQ5ZDhiOWQ1YzBmYThlM2RlNzJiYjNiYTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.O_WBVdoJV4CbpTcpQTxtNeU2JFrQiuNllzHF5M7aelY)
Am I using the correct setting?
The text was updated successfully, but these errors were encountered: