Skip to content

Commit

Permalink
1. resolve leveldb could not create radom file On windows;2. log tar.…
Browse files Browse the repository at this point in the history
…gz -> gz
  • Loading branch information
Yrp committed Aug 20, 2018
1 parent f9a5058 commit 20cd991
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ repositories {
maven { url 'http://mvnrepository.com' }
mavenLocal()
mavenCentral()
maven { url 'http://repo.spring.io/plugins-release' }
}
def versions = [
checkstyle: '8.7',
Expand All @@ -68,6 +69,24 @@ configurations.getByName('checkstyleConfig') {
transitive = false
}

static def isWindows() {
return org.gradle.internal.os.OperatingSystem.current().isWindows()
}

if (isWindows()) {
ext {
leveldbGroup = "org.ethereum"
leveldbName = "leveldbjni-all"
leveldbVersion = "1.18.3"
}
} else {
ext {
leveldbGroup = "org.fusesource.leveldbjni"
leveldbName = "leveldbjni-all"
leveldbVersion = "1.8"
}
}

dependencies {
//local libraries
compile fileTree(dir: 'libs', include: '*.jar')
Expand Down Expand Up @@ -95,8 +114,7 @@ dependencies {

compile "org.iq80.leveldb:leveldb:0.7"

compile group: 'org.fusesource.leveldbjni', name: 'leveldbjni-all',
version: '1.8'
compile group: leveldbGroup, name: leveldbName, version: leveldbVersion

compile "org.apache.commons:commons-collections4:4.0"

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- rollover daily -->
<fileNamePattern>./logs/tron-%d{yyyy-MM-dd}.%i.log.tar.gz</fileNamePattern>
<fileNamePattern>./logs/tron-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<!-- each file should be at most 500MB, keep 30 days worth of history, but at most 50GB -->
<maxFileSize>500MB</maxFileSize>
<maxHistory>720</maxHistory>
Expand Down

0 comments on commit 20cd991

Please sign in to comment.