<p>Usually Bisq is run from its 'shadow jar', i.e. the executable fat jar<br>
that collapses all dependencies and resources into a single file. In that<br>
scenario, only a single 'logback.xml' is included in the fat jar and all<br>
is well.</p>
<p>However, when Bisq is run with a normal external classpath, e.g. from<br>
within IDEA, when using <code>gradle :desktop:run</code> or when running one of the<br>
Gradle-generated shell scripts under desktop/build/scripts, multiple<br>
'logback.xml' files are present on the classpath, which causes Logback<br>
to complain with messages like the following:</p>
<pre><code>Found resource [logback.xml] at [file:.../desktop/build/resources/main/logback.xml]
Resource [logback.xml] occurs multiple times on the classpath.
Resource [logback.xml] occurs at [file:.../desktop/build/resources/main/logback.xml]
Resource [logback.xml] occurs at [jar:file:.../core/build/libs/core.jar!/logback.xml]
</code></pre>
<p>Note the last line above. The presence of 'logback.xml' in the bisq-core<br>
jar is the 'duplicate'. This is Logback's way of warning the user that<br>
it doesn't know which file should be considered canonical. The only way<br>
to avoid this error message (and the many other lines that get output<br>
along with it) is to remove the offending duplicate file.</p>
<p>This commit removes logback.xml from core to solve the problem described<br>
above. The file is unnecessary in the context of running bisq-desktop,<br>
bisq-seednode, etc, and the only context in which it would actually be<br>
used is when running BisqHeadlessAppMain in core. With that said, the<br>
configuration in the core logback.xml file is identical to the default<br>
Logback configuration, so removing the file has no effect on the logging<br>
output from BisqHeadlessAppMain, and furthermore, it appears that<br>
BisqHeadlessAppMain is not actually in use anywhere right now (it was<br>
added some months ago in anticipation of integrating the new HTTP API,<br>
but this has yet to occur).</p>
<p>In a future change, we should probably return the core module to being a<br>
pure library, without any main methods, and introduce a different<br>
module, e.g. 'daemon' that contains the equivalent of<br>
BisqHeadlessAppMain and whatever logback.xml configuration is<br>
appropriate for it. Doing things this way will avoid the 'duplicate'<br>
errors shown above, because desktop, seednode, etc will not depend on<br>
core module, but will not depend on the daemon module.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/1954'>https://github.com/bisq-network/bisq/pull/1954</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Remove Logback config xml from core module</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>D</strong>
    <a href="https://github.com/bisq-network/bisq/pull/1954/files#diff-0">core/src/main/resources/logback.xml</a>
    (13)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/1954.patch'>https://github.com/bisq-network/bisq/pull/1954.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/1954.diff'>https://github.com/bisq-network/bisq/pull/1954.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/1954">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZthVcymtIrJVffuYBUMvTh-7ypFCrks5ux6MhgaJpZM4YwNG3">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZtuHCWDpj2xrNuiJJ3f90bRPH-DcKks5ux6MhgaJpZM4YwNG3.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bisq","title":"bisq-network/bisq","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bisq"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Remove Logback config xml from core module (#1954)"}],"action":{"name":"View Pull Request","url":"https://github.com/bisq-network/bisq/pull/1954"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/1954",
"url": "https://github.com/bisq-network/bisq/pull/1954",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Remove Logback config xml from core module (#1954)",
"sections": [
{
"text": "",
"activityTitle": "**Chris Beams**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@cbeams",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "b864a84",
"value": "Remove Logback config xml from core module"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Removed",
"value": "[core/src/main/resources/logback.xml](https://github.com/bisq-network/bisq/pull/1954/files#diff-0) (13 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"bisq-network/bisq\",\n\"issueId\": 1954,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"bisq-network/bisq\",\n\"pullRequestId\": 1954\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1954"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1954.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1954.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 415289783\n}"
}
],
"themeColor": "26292E"
}
]</script>