The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/views/admin/apps/LogEntry.tsx

35 lines
770 B

import { Box } from '@rocket.chat/fuselage';
import React, { FC } from 'react';
import { useTranslation } from '../../../contexts/TranslationContext';
import { useHighlightedCode } from '../../../hooks/useHighlightedCode';
type LogEntryProps = {
severity: string;
timestamp: string;
caller: string;
args: unknown;
};
const LogEntry: FC<LogEntryProps> = ({ severity, timestamp, caller, args }) => {
const t = useTranslation();
return (
<Box>
<Box>
{severity}: {timestamp} {t('Caller')}: {caller}
</Box>
<Box withRichContent width='full'>
<pre>
<code
dangerouslySetInnerHTML={{
__html: useHighlightedCode('json', JSON.stringify(args, null, 2)),
}}
/>
</pre>
</Box>
</Box>
);
};
export default LogEntry;