Skip to content
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

update tracing #125

Merged
merged 2 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Distribution.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: distribution
name: Distribution

on:
workflow_dispatch:
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ If you *need* distribution details, please refer to [blog (2024)](https://blck-b
`./gradlew nativeCompile` - (needs GraalVM) native backend compilation to `build/native/nativeCompile`

scripts in `vue/package.json` - use these to export electron

### Tracing
Generating graal aot `tracing` works for me only by running the generated bootJar as `java -jar
-agentlib:native-image-agent=config-output-dir=tracing MRT-X.jar`
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ java {
}

dependencies {
implementation 'org.xerial:sqlite-jdbc:3.47.1.0'
implementation 'org.xerial:sqlite-jdbc:3.47.0.0'
implementation 'org.jsoup:jsoup:1.18.3'

testImplementation(platform('org.junit:junit-bom:5.11.3'))
Expand All @@ -73,6 +73,7 @@ bootJar {
archiveFileName = "MRT-${version}.jar"
}

// generate aot tracing - rather see contributing.md
//bootRun {
// jvmArgs("-agentlib:native-image-agent=config-output-dir=tracing")
//}
Expand Down
37 changes: 19 additions & 18 deletions src/main/java/com/blck/MusicReleaseTracker/Core/ErrorLogging.java
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
/*
* MusicReleaseTracker
* Copyright (C) 2023 - 2024 BLCK
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.blck.MusicReleaseTracker.Core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;

/* MusicReleaseTracker
Copyright (C) 2023 BLCK
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.*/

@Component
public class ErrorLogging {

public enum Severity {
SEVERE, WARNING, INFO
}
private final ValueStore store;
private final Logger logger = Logger.getLogger("errorLogger");
@Autowired
Expand Down Expand Up @@ -64,4 +61,8 @@ public void error(Exception e, Severity level, String message) {
System.exit(1);
}
}

public enum Severity {
SEVERE, WARNING, INFO
}
}
Loading
Loading