Skip to content

Commit

Permalink
refactor: Shorten timestamp in copy text logs
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed May 10, 2024
1 parent a137e68 commit e49d1f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/components/pages/LogsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export class LogsPage extends React.Component<LogsPageProps, LogsPageState> {
}
const logData = window.Shared.log.entries.filter(l => window.Shared.preferences.data.showLogLevel[l.logLevel])
.map(formedLog => {
return `[${LogLevel[formedLog.logLevel].padEnd(5)}] [${(new Date(formedLog.timestamp)).toLocaleString('en-GB')}]: (${formedLog.source}) - ${formedLog.content}`;
return `[${LogLevel[formedLog.logLevel].padEnd(5)}] [${(new Date(formedLog.timestamp)).toLocaleTimeString('en-GB')}]: (${formedLog.source}) - ${formedLog.content}`;
})
.join('\n');
navigator.clipboard.writeText(logData);
Expand Down

0 comments on commit e49d1f5

Please sign in to comment.