glycobook 0.1.0.alpha.12-java → 0.1.0.alpha.13-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/glycobook/Loggerinit.rb +23 -0
- data/lib/glycobook/subsumption.rb +1 -1
- data/lib/glycobook.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6597991ee22be9f80490074af766e649928da064481acc7cec61696beda9212
|
4
|
+
data.tar.gz: 84ff7fb0d1e34c14b2ba60e42870e96aa01080a9bd4aa96e9ac18610c93eadb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d97a3ebcd70fac044adc0d16989da2f9ee8042f4d65b4f18977cd91df7e4216a724a6a9de34211ac22837b796ae69b6952589624060a392faae21b72d471316
|
7
|
+
data.tar.gz: 66c04e3a9fd53e7d5c5ae219664c0100b2fe18e7d3b31f5deb243d8abcca109c111dabbabfa58964af819c633b2a4caa0bf0d7355b100aca8d655c7881aaf587
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'java'
|
2
|
+
require 'logger'
|
3
|
+
require_relative '../jar/slf4j-api.jar'
|
4
|
+
java_import 'org.slf4j.LoggerFactory'
|
5
|
+
|
6
|
+
class JRubySLF4JLogger < Logger
|
7
|
+
def initialize(name)
|
8
|
+
super(STDOUT) # STDOUTはダミー、実際のログはSLF4Jを通じて行われる
|
9
|
+
@java_logger = LoggerFactory.getLogger(name)
|
10
|
+
end
|
11
|
+
|
12
|
+
def add(severity, message = nil, progname = nil)
|
13
|
+
# Rubyのログレベルに応じてJavaのSLF4Jメソッドを呼び出す
|
14
|
+
case severity
|
15
|
+
when Logger::INFO
|
16
|
+
@java_logger.info(message)
|
17
|
+
# 他のログレベルについても同様に実装
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
logger = JRubySLF4JLogger.new("MyLogger")
|
23
|
+
logger.info("This is an info message from JRuby with SLF4J")
|
data/lib/glycobook.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glycobook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.alpha.
|
4
|
+
version: 0.1.0.alpha.13
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Akihiro Fujita
|
@@ -34,6 +34,7 @@ files:
|
|
34
34
|
- jar.yml
|
35
35
|
- lib/bookinit.rb
|
36
36
|
- lib/glycobook.rb
|
37
|
+
- lib/glycobook/Loggerinit.rb
|
37
38
|
- lib/glycobook/gly_tou_can.rb
|
38
39
|
- lib/glycobook/glycan_builder.rb
|
39
40
|
- lib/glycobook/glycan_format_converter.rb
|