https://github.com/appulse-projects/logging-java
Logging dependency for Appulse Java projects
https://github.com/appulse-projects/logging-java
appulse java logging
Last synced: 12 days ago
JSON representation
Logging dependency for Appulse Java projects
- Host: GitHub
- URL: https://github.com/appulse-projects/logging-java
- Owner: appulse-projects
- License: apache-2.0
- Created: 2018-01-20T15:44:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-27T22:10:32.000Z (over 6 years ago)
- Last Synced: 2025-01-21T02:43:30.888Z (over 1 year ago)
- Topics: appulse, java, logging
- Language: Java
- Size: 135 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
[](https://travis-ci.org/appulse-projects/logging-java)
[](https://maven-badges.herokuapp.com/maven-central/io.appulse/logging-java)
[](http://www.apache.org/licenses/LICENSE-2.0.html)
Common logging project for Appulse project. It contains all required dependencies as well as colorizing configurations for logging output.
## Usage
Just add dependency to your project.
**Maven**:
```xml
...
io.appulse
logging-java
1.1.3
...
```
**Gradle**:
```groovy
compile 'io.appulse:logging-java:1.1.3'
```
And use it as usual:
```java
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SomeClass {
Logger log = LoggerFactory.getLogger(SomeClass.class);
public void doSomeLog () {
log.info("info message");
log.warn("warn message");
log.error("error message");
}
}
```
or, if you use a Lombok Project:
```java
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SomeClass {
public void doSomeLog () {
log.info("info message");
log.warn("warn message");
log.error("error message");
}
}
```
With default configuration (no `logback.xml` in classpath at all) it looks like:

You also could to override default `logback`'s configuration, like an example below.
**resources/logback.xml**:
```xml
```
And output will be like:

## Development
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
For building the project you need only a [Java compiler](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
> **IMPORTANT:** the project requires Java version starting from **8**
And, of course, you need to clone the project from GitHub:
```bash
$> git clone https://github.com/appulse-projects/logging-java
$> cd logging-java
```
### Building
For building routine automation, I am using [maven](https://maven.apache.org).
To build the project, do the following:
```bash
$> mvn clean package
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.447 s
[INFO] Finished at: 2018-01-23T18:36:20+03:00
[INFO] Final Memory: 52M/175M
[INFO] ------------------------------------------------------------------------
```
### Running the tests
To run the project's test, do the following:
```bash
$> mvn clean test
...
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
...
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 20, Failures: 0, Errors: 0, Skipped: 0
[INFO]
...
```
Also, if you do `package` or `install` goals, the tests launch automatically.
## Deploy
To deploy the project in Maven Central, use the following command:
```bash
$> ./mvnw \
-DskipTests \
-Dmaven.test.skip=true \
-Dfindbugs.skip=true \
-Dpmd.skip=true \
-Dcheckstyle.skip \
-Dmaven.javadoc.skip=false \
--settings .settings.xml \
deploy -B
```
It maybe usefull to import `gpg`'s secret keys and ownertrust from somewhere:
```bash
$> echo "${GPG_SECRET_KEYS}" | base64 --decode | "${GPG_EXECUTABLE}" --batch --passphrase "${GPG_PASSPHRASE}" --import
...
$> echo "${GPG_OWNERTRUST}" | base64 --decode | "${GPG_EXECUTABLE}" --batch --passphrase "${GPG_PASSPHRASE}" --import-ownertrust
...
```
## Built With
* [Java](http://www.oracle.com/technetwork/java/javase) - is a systems and applications programming language
* [Lombok](https://projectlombok.org) - is a java library that spicing up your java
* [Junit](http://junit.org/junit4/) - is a simple framework to write repeatable tests
* [AssertJ](http://joel-costigliola.github.io/assertj/) - AssertJ provides a rich set of assertions, truly helpful error messages, improves test code readability
* [Maven](https://maven.apache.org) - is a software project management and comprehension tool
## Changelog
To see what has changed in recent versions of the project, see the [changelog](./CHANGELOG.md) file.
## Contributing
Please read [contributing](./CONTRIBUTING.md) file for details on my code of conduct, and the process for submitting pull requests to me.
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/appulse-projects/logging-java/tags).
## Authors
* **[Artem Labazin](https://github.com/xxlabaza)** - creator and the main developer
## License
This project is licensed under the Apache License 2.0 License - see the [license](./LICENSE) file for details