Skip to content

Commit

Permalink
[Optimize][Web]Optimize java log highlight (DataLinkDC#2452)
Browse files Browse the repository at this point in the history
* fix_some_web_bug

* optimize_javalog_highlight
  • Loading branch information
zackyoungh authored Oct 28, 2023
1 parent f875ba7 commit bedf519
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dinky-admin/src/main/java/org/dinky/utils/MavenUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
@Slf4j
public class MavenUtil {
static final String javaExecutor = FileUtil.file(
FileUtil.file(SystemUtil.getJavaRuntimeInfo().getHomeDir()).getParentFile(), "/bin/java")
FileUtil.file(SystemUtil.getJavaRuntimeInfo().getHomeDir()), "/bin/java")
.getAbsolutePath();
private static final String EXECTOR = SystemUtil.getOsInfo().isWindows() ? "mvn.cmd" : "mvn";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ export function LogLanguage(monaco: any) {
root: [
// 默认不区分大小写 //
[/\[(\w*-\d*)+\]/, 'custom-thread'],
[/\s+(\w.+):$/, 'custom-class'],
[/(\w+(\.))+(\w+)(\(\d+\))?(:){1}/, 'custom-class'],
[/(\w+(\.))+(\w+)(\(\d+\))?\s+/, 'custom-class'],
[/error/, 'custom-error'],
[/warring/, 'custom-warning'],
[/warn/, 'custom-warning'],
[/info/, 'custom-info'],
[
/^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d\.\d{3}/,
'custom-date'
],
[
/[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d\s(CST)/,
'custom-date'
]
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type BuildStepsProps = {

const CodeShowProps = {
height: '50vh',
language: 'java',
language: 'javalog',
lineNumbers: 'on',
showFloatButton: true
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const CodeEditProps = {
height: '82vh',
width: '100%',
lineNumbers: 'on',
language: 'java'
language: 'javalog',
autoWrap: 'off'
};
const RootLogs = () => {
const [code, setCode] = useState<string>('');
Expand Down

0 comments on commit bedf519

Please sign in to comment.