Skip to content

Commit c97abd7

Browse files
authored
Merge pull request #13 from VimukthiRajapaksha/main
Feat: Standardize log file naming convention and streamline release artifacts
2 parents a52fbaf + 96bbb99 commit c97abd7

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

.github/workflows/translator-release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,11 @@ jobs:
101101
RELEASE_DIR="release/swift-mt-mx-translator-${{ steps.get_version.outputs.version }}"
102102
103103
# Copy JAR file from build location
104-
cp ${{ env.PROJECT_PATH }}/target/bin/*.jar ${RELEASE_DIR}/
104+
cp ${{ env.PROJECT_PATH }}/target/bin/swiftMtMxTranslator.jar ${RELEASE_DIR}/swiftMtMxTranslator-${{ steps.get_version.outputs.version }}.jar
105105
106106
# Copy configuration files
107107
cp ${{ env.PROJECT_PATH }}/Config.toml ${RELEASE_DIR}/Config.sample.toml
108108
109-
# Copy source files for reference
110-
mkdir -p ${RELEASE_DIR}/src
111-
cp ${{ env.PROJECT_PATH }}/*.bal ${RELEASE_DIR}/src/
112-
113109
# Create README
114110
cat > ${RELEASE_DIR}/README.md << 'EOF'
115111
# SWIFT MT/MX Translator Release

translator/integrations/ftp-sftp/swiftMtMxTranslator/Dependencies.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ modules = [
369369
[[package]]
370370
org = "ballerinax"
371371
name = "financial.iso20022ToSwiftmt"
372-
version = "1.0.2"
372+
version = "1.0.3"
373373
dependencies = [
374374
{org = "ballerina", name = "data.xmldata"},
375375
{org = "ballerina", name = "io"},
@@ -402,7 +402,7 @@ modules = [
402402
[[package]]
403403
org = "ballerinax"
404404
name = "financial.swiftmtToIso20022"
405-
version = "1.0.3"
405+
version = "1.0.4"
406406
dependencies = [
407407
{org = "ballerina", name = "data.xmldata"},
408408
{org = "ballerina", name = "io"},
@@ -421,7 +421,7 @@ modules = [
421421
[[package]]
422422
org = "wso2"
423423
name = "swiftMtMxTranslator"
424-
version = "1.0.0"
424+
version = "1.0.2"
425425
dependencies = [
426426
{org = "ballerina", name = "file"},
427427
{org = "ballerina", name = "ftp"},

translator/integrations/ftp-sftp/swiftMtMxTranslator/service.bal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import ballerina/time;
2323
public function main() returns error? {
2424
time:Utc utc = time:utcNow();
2525
string date = time:utcToString(utc).substring(0, 10);
26-
string filePath = log.ballerinaLogFilePath + "/ballerina" + date + ".log";
26+
string filePath = log.ballerinaLogFilePath + "/ballerina-" + date + ".log";
2727
log:Error? outputFile = log:setOutputFile(filePath, log:APPEND);
2828
if outputFile is log:Error {
2929
log:printWarn(string `[Listner - ${mtMxListenerName}] Failed to set the output file for ballerina log.`);

translator/integrations/ftp-sftp/swiftMtMxTranslator/utils.bal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function appendToDashboardLogs(string listenerName, string orgnlMessage, string
153153
io:FileWriteOption option = OPTION_APPEND;
154154
time:Utc utc = time:utcNow();
155155
string date = time:utcToString(utc).substring(0, 10);
156-
string filePath = log.dashboardLogFilePath + "dashboard" + date + ".log";
156+
string filePath = log.dashboardLogFilePath + "dashboard-" + date + ".log";
157157
io:Error? fileWriteString = io:fileWriteString(filePath, jsonLogString, option);
158158
if fileWriteString is io:Error {
159159
handleLogFailure(listenerName, msgId, fileWriteString);

0 commit comments

Comments
 (0)