*SteemJ v0.4.0 will finally allow you to choose the logging framework of your choice.* <center>  </center> # SteemJ V0.4.0 Feature Preview – Logging Hello Steemians! The development of SteemJ in version 0.4.0 is going on and some big features are planned. I will use this series to give you a small preview of what will come. Today`s post is about the changes related to the logging. # Logging Prior to SteemJ version 0.4.0, SteemJ was shipped with a logging framework implementation. As this is a bad practice for several reasons, SteemJ 0.4.0 removed this implementation and allows you to configure the logging on your own. To achieve this, SteemJ only contains the <i>slf4j-api</i> and expects you, to add the slf4j implementation of your choice to your project. A list of the most common implementations can be found at [www.slf4j.org/manual](https://www.slf4j.org/manual.html), while you can find a lot more in the "vastness of the internet". # Example Configuration One good example of an alternative slf4j implementation is <b>log4j-slf4j-impl</b>, which implements the slf4j-api and adds the powerfull configuration options of log4j2. As a first step, the log4j-slf4j-impl jar needs to be added to your project. The most easiest way to achieve this is the usage of a Build-Management tool like Maven, because you only need to add the required dependencies the pom.xml. ```XML <dependency> <groupId>eu.bittrade.libs</groupId> <artifactId>steemj-core</artifactId> <version>${steemJ.version}</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j-impl</artifactId> <version>${log4j.version}</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>${log4j.version}</version> </dependency> ``` To finalize the logging configuration of your project, create a <i>log4j2.xml</i> and add it to the <i>src/main/resources</i> folder. An example <i>log4j2.xml</i> configuration is shown below. ```XML <?xml version="1.0" encoding="UTF-8"?> <Configuration status="INFO"> <Appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> </Console> </Appenders> <Loggers> <Logger name="eu.bittrade.libs.steemj" level="WARN"> <AppenderRef ref="Console" /> </Logger> <Logger name="my.project" level="DEBUG"> <AppenderRef ref="Console" /> </Logger> <Root level="ERROR" /> </Loggers> </Configuration> ``` The configuration above would append all log messages of: * SteemJ, that have a severity of <b>WARN</b> or higher * your project (package my.project), that have a severity of <b>DEBUG</b> or higher to the console, while ignoring all other log messages, because no logger is defined for <i>Root</i>. If you want to use log4j2 in your project too, you should have a look at the [official documentation](https://logging.apache.org/log4j/2.0/manual/configuration.html) to find detailed configuration examples. # General information ## What is SteemJ? SteemJ is a project that allows you to communicate with a Steem node using Java. So far, the project supports most of the API calls and is also able to broadcast most of the common operation types. Further information can be found on [GitHub](https://github.com/marvin-we/steem-java-api-wrapper). > https://github.com/marvin-we/steem-java-api-wrapper ## How to add it to your project? SteemJ binaries are pushed into the maven central repository and can be integrated with a bunch of build management tools like Maven. The [Wiki](https://github.com/marvin-we/steem-java-api-wrapper/wiki/How-to-add-SteemJ-to-your-project) provides a lot of examples for the most common build tools. If you do not use a build management tool you can download the binaries as described [here](https://github.com/marvin-we/steem-java-api-wrapper/wiki/How-to-add-SteemJ-to-your-project#download). ## Contribute The project became quite big and there is still a lot to do. If you want to support the project simply clone the git repository and submit a pull request. I would really appreciate it =). > git clone https://github.com/marvin-we/steem-java-api-wrapper.git ## Get in touch! Most of my projects are pretty time consuming and I always try to provide some useful stuff to the community. What keeps me going for that is your feedback and your support. For that reason I would love to get some Feedback from you <3. Just contact me here on [Steemit](https://steemit.com/@dez1337) or ping me on [GitHub](https://github.com/marvin-we/steem-java-api-wrapper). <hr> <center>If you want to stay up to date or just like the stuff I am doing it would be great if you could press the button below =). <br> | Follow me | Follow @dez1337 | | ------------- | ------------- | | [](https://steemit.com/@steemj) | [](https://steemit.com/@dez1337) | <br> Thanks for reading and best regards, @dez1337 </center>
author | steemj |
---|---|
permlink | steemj-v0-4-0-feature-preview-logging |
category | steemdev |
json_metadata | {"tags":["steemdev","steem","java","programming","steem-dev"],"users":["dez1337"],"image":["https://imgur.com/bIhZlYT.png","https://steemitimages.com/0x0/https://steemitimages.com/0x0/http://imgur.com/n1bWw14.png","http://imgur.com/GlepNAo.png"],"links":["https://www.slf4j.org/manual.html","https://logging.apache.org/log4j/2.0/manual/configuration.html","https://github.com/marvin-we/steem-java-api-wrapper","https://github.com/marvin-we/steem-java-api-wrapper/wiki/How-to-add-SteemJ-to-your-project","https://github.com/marvin-we/steem-java-api-wrapper/wiki/How-to-add-SteemJ-to-your-project#download","https://github.com/marvin-we/steem-java-api-wrapper.git","https://steemit.com/@dez1337","https://steemit.com/@steemj"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-09-03 16:41:45 |
last_update | 2017-09-03 16:41:45 |
depth | 0 |
children | 6 |
last_payout | 2017-09-10 16:41:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 81.548 HBD |
curator_payout_value | 25.581 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 5,173 |
author_reputation | 1,153,292,944,592 |
root_title | "SteemJ V0.4.0 Feature Preview – Logging" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,759,524 |
net_rshares | 29,180,756,416,643 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
teamsteem | 0 | 15,899,563,829,675 | 100% | ||
transisto | 0 | 12,409,029,737,819 | 100% | ||
sergey44 | 0 | 0 | 100% | ||
marcusorlyius | 0 | 4,016,561,803 | 100% | ||
dez1337 | 0 | 56,615,173,300 | 100% | ||
discernente | 0 | 3,176,831,049 | 100% | ||
gutzofter | 0 | 82,956,193,476 | 100% | ||
nicnas | 0 | 49,721,587,721 | 27% | ||
stackin | 0 | 14,962,892,485 | 1% | ||
steemj | 0 | 506,697,615 | 100% | ||
dehenne | 0 | 22,708,670,548 | 100% | ||
bendelgreco | 0 | 2,705,354,947 | 100% | ||
jungs | 0 | 96,593,799,962 | 41% | ||
liuke96player | 0 | 172,955,290 | 100% | ||
boucaron | 0 | 747,477,927 | 100% | ||
yogevm | 0 | 16,486,348,336 | 100% | ||
themarkymark | 0 | 8,393,793,884 | 40% | ||
hswick | 0 | 619,520,000 | 100% | ||
steemvalve | 0 | 1,033,568,631 | 100% | ||
techtek | 0 | 4,225,971,664 | 100% | ||
coldsteem | 0 | 9,042,315,583 | 100% | ||
a1n21t | 0 | 574,326,689 | 100% | ||
jjb777 | 0 | 965,732,121 | 100% | ||
khamil | 0 | 604,892,558 | 100% | ||
chocolate2018 | 0 | 501,904,563 | 100% | ||
fbslo | 0 | 366,780,786 | 100% | ||
yashhanda | 0 | 1,810,222,238 | 100% | ||
inferno4201 | 0 | 219,865,158 | 100% | ||
xeyri | 0 | 124,211,511 | 100% | ||
ibrahiim7 | 0 | 1,120,606,747 | 100% | ||
hamouda | 0 | 1,120,008,350 | 100% | ||
sidisaad | 0 | 1,162,115,140 | 100% | ||
salah3 | 0 | 859,812,153 | 100% | ||
qura | 0 | 482,300,276,422 | 100% | ||
moemyint | 0 | 993,641,929 | 100% | ||
sontiogo | 0 | 1,120,000,188 | 100% | ||
arvinder | 0 | 1,160,621,953 | 100% | ||
huntacrypto | 0 | 1,021,346,223 | 100% | ||
nutritionhealth | 0 | 290,154,887 | 100% | ||
kenweiner | 0 | 1,160,615,312 | 100% |
Good job bro...
author | chandankumar007 |
---|---|
permlink | re-steemj-steemj-v0-4-0-feature-preview-logging-20170903t191116944z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-09-03 19:11:24 |
last_update | 2017-09-03 19:11:24 |
depth | 1 |
children | 0 |
last_payout | 2017-09-10 19:11:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.064 HBD |
curator_payout_value | 0.010 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 15 |
author_reputation | 71,702,339,729 |
root_title | "SteemJ V0.4.0 Feature Preview – Logging" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,772,332 |
net_rshares | 20,877,514,196 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dez1337 | 0 | 20,877,514,196 | 39% | ||
steemj | 0 | 0 | 100% | ||
chandankumar007 | 0 | 0 | 0% |
Keep the good work. I am starting to use it with good results.
author | discernente |
---|---|
permlink | re-steemj-steemj-v0-4-0-feature-preview-logging-20170903t164941096z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-09-03 16:49:27 |
last_update | 2017-09-03 16:49:27 |
depth | 1 |
children | 0 |
last_payout | 2017-09-10 16:49:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.206 HBD |
curator_payout_value | 0.009 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 62 |
author_reputation | 569,779,453,117,908 |
root_title | "SteemJ V0.4.0 Feature Preview – Logging" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,760,186 |
net_rshares | 59,296,363,151 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dez1337 | 0 | 55,553,638,801 | 100% | ||
discernente | 0 | 3,257,474,253 | 100% | ||
steemj | 0 | 485,250,097 | 100% |
author | nutritionhealth |
---|---|
permlink | re-steemj-steemj-v0-4-0-feature-preview-logging-20170903t175120992z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-09-03 17:51:24 |
last_update | 2017-09-03 17:51:24 |
depth | 1 |
children | 0 |
last_payout | 2017-09-10 17:51:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.057 HBD |
curator_payout_value | 0.017 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 72 |
author_reputation | -36,787,585,889 |
root_title | "SteemJ V0.4.0 Feature Preview – Logging" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,765,656 |
net_rshares | 21,027,674,699 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dez1337 | 0 | 20,523,658,023 | 39% | ||
steemj | 0 | 504,016,676 | 100% |
Thanks man, good post. Keep it that way Peace
author | sontiogo |
---|---|
permlink | re-steemj-steemj-v0-4-0-feature-preview-logging-20170903t175011436z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-09-03 17:50:09 |
last_update | 2017-09-03 17:50:09 |
depth | 1 |
children | 0 |
last_payout | 2017-09-10 17:50:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.173 HBD |
curator_payout_value | 0.032 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 45 |
author_reputation | 366,797,798,494 |
root_title | "SteemJ V0.4.0 Feature Preview – Logging" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,765,550 |
net_rshares | 56,778,680,157 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dez1337 | 0 | 55,201,562,960 | 100% | ||
steemj | 0 | 474,526,338 | 100% | ||
sontiogo | 0 | 1,102,590,859 | 100% | ||
andyartland | 0 | 0 | 100% |
I don't use Java, but I love to see the API get better and more accessible. Thanks for all your work!
author | themarkymark |
---|---|
permlink | re-steemj-steemj-v0-4-0-feature-preview-logging-20170903t171917650z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-09-03 17:19:15 |
last_update | 2017-09-03 17:19:15 |
depth | 1 |
children | 1 |
last_payout | 2017-09-10 17:19:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.150 HBD |
curator_payout_value | 0.047 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 103 |
author_reputation | 1,780,080,004,399,932 |
root_title | "SteemJ V0.4.0 Feature Preview – Logging" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,762,846 |
net_rshares | 54,603,797,021 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dez1337 | 0 | 54,139,994,442 | 100% | ||
steemj | 0 | 463,802,579 | 100% |
Thank you very much for the positive feedback and for the support!
author | dez1337 |
---|---|
permlink | re-themarkymark-re-steemj-steemj-v0-4-0-feature-preview-logging-20170903t181007114z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-09-03 18:10:06 |
last_update | 2017-09-03 18:10:06 |
depth | 2 |
children | 0 |
last_payout | 2017-09-10 18:10:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.180 HBD |
curator_payout_value | 0.059 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 66 |
author_reputation | 20,544,257,521,749 |
root_title | "SteemJ V0.4.0 Feature Preview – Logging" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,767,239 |
net_rshares | 65,974,274,223 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dez1337 | 0 | 65,974,274,223 | 100% |