Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging framework #502

Closed
iluwatar opened this issue Oct 6, 2016 · 5 comments
Closed

Logging framework #502

iluwatar opened this issue Oct 6, 2016 · 5 comments

Comments

@iluwatar
Copy link
Owner

iluwatar commented Oct 6, 2016

Instead of printing output to System.out we should use a logging framework such as Log4j to allow redirecting and filtering of output. In some cases this also eases testing. The refactoring should be applied across all the patterns.

@dbryla
Copy link

dbryla commented Oct 13, 2016

I'll handle this. :) I propose to go with SLF4J API and Logback implementation.

@iluwatar
Copy link
Owner Author

@dbryla the proposal is ok for me, you are good to go.

@dbryla
Copy link

dbryla commented Oct 23, 2016

Should I leave System.out in applications with tests based on StdOut or should I rewrite tests?

dbryla pushed a commit to dbryla/java-design-patterns that referenced this issue Oct 23, 2016
@iluwatar
Copy link
Owner Author

We want to migrate the tests also. If it causes trouble we can deal with it later.

dbryla pushed a commit to dbryla/java-design-patterns that referenced this issue Oct 28, 2016
…this example using logger isn't good idea
dbryla pushed a commit to dbryla/java-design-patterns that referenced this issue Nov 4, 2016
dbryla pushed a commit to dbryla/java-design-patterns that referenced this issue Nov 4, 2016
@dbryla
Copy link

dbryla commented Nov 4, 2016

PR: #515

Build on travis failed:

The log length has exceeded the limit of 4 Megabytes (this usually means that test suite is raising the same exception over and over).

The build has been terminated.

Can we increase limit?

dbryla pushed a commit to dbryla/java-design-patterns that referenced this issue Nov 17, 2016
iluwatar added a commit that referenced this issue Nov 18, 2016
#502 Added logging framework to repository
@iluwatar iluwatar added this to the 1.14.0 milestone Nov 18, 2016
grzegorz2047 added a commit to grzegorz2047/java-design-patterns that referenced this issue Feb 13, 2017
* Initial commit of the object mother iluwatar#498

Add a simple king and queen classes which implement the behaviour of the
royalty interface. Also wrote the object mother of royalty objects which
is final so you can just call the static methods in it to create objects
with a specific state to use them fast in tests. The tests are already
created for testing the behaviour and the type of the objects which are
created by the object mother.
I also created the UML diagrams via object aid and updated the readme.

* Add PlantUML file for the UML diagram iluwatar#498

* End process logic clause has been corrected.

* Unused import removed.

* Add SonarQube.com badge

* iluwatar#502 Replaced usages of System.out with logger.

* Change name of variables in test iluwatar#498

* add entry to parent pom.xml iluwatar#498

* Fix pom.xml

* Fix pom.xml

Deleted </modules> tag because i added it one time more than neccessary

* FirstCut++

FirstCut++

* SecondCut++

SecondCut++

* App++

App++

* App

App

* checkstyle errors removed

checkstyle errors removed

* iluwatar#502 Reverted changes in composite example, due to nature of this example using logger isn't good idea

* Remove use of coveralls-maven-plugin (sonarqube.com covers this)

* iluwatar#502 Adjusted tests for logger introduction

* iluwatar#502 Introduced logging in new example

* Create presentation template

* Link Hexagonal Architecture pattern to corresponding blog entry

* Work on Hexagonal Architecture presentation

* Add new diagram

* Add presentation link to README.md

* Update App.java

The relationship between decorator and target (in the code example between Troll und SmartTroll) ist not a composition as described in the code comment lines of class App. It's a aggregation. In a composition both instances canncot live without the other one. But the target (Troll) could live without the decorator (Smart Troll). Changed "composition" to "aggregation" in the comment lines. Code lines are unchanged.
Greetings Thomas

* Review comments++

* Review comments++

* iluwatar#502 Reduced amount of information logged

* Issue iluwatar#450. First commit. Queue Based Load Leveling

* Issue iluwatar#450. Updated pom.xml

* Updated checkstyle errors.

* Updated pom.xml with maven-pmd-plugin

Added dependency "maven-pmd-plugin" to the pom file.

* Reverted pom.xml changes that are done previously.

* Fixed PMD issue.

* Decorator pattern: Improve the example

* Removed unused imports in tests

* Proxy pattern: Improve the example

* Proxy pattern: Add missing license header

* Update URM Version to 1.4.4 and regenerated all puml files

* Update license headers

* Fixed all the code changes after review

* Review comments++

* Sonar bug fixes using Yoda condition in equals expression when comparing String literal with String object.
Using try-with-resources if we use Scanner to close the underlying stream is a good practice to handle resources.
Minimal refactor.

* Sonar bug fixes using Yoda condition in equals expression when comparing String literal with String object.
Using try-with-resources if we use Scanner to close the underlying stream is a good practice to handle resources.
Minimal refactor.

* Adding initialization on demand holder idiom.

* Changing constant interface pattern with a Noninstantiable class

* Add some material for proxy presentation.

* Add presentation for Proxy pattern.

* Add link to Proxy presentation.

* Achieved milestone 1.14.0

* Set version for next development iteration

* iluwatar#525 Add link to Queue-Based Load Leveling blog

* iluwatar#525 Add link to proxy blog

* Changing code to use interfaces instead of implementations.

* Changing code to use interfaces instead of implementations.

* Reverting initialization on demand holder idiom.

* iluwatar#190 Regenerate puml files

* iluwatar#190 Rename package for Queue-Based Load Leveling pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants