GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - appulse-projects/logging-java: Logging dependency for Appulse Java projects

BranchesTags
Open more actions menu

Latest commit

 

History

39 Commits
39 Commits

Folders and files

NameName
Last commit message
Last commit date
.codestyle
.codestyle
 
 
.images
.images
 
 
.mvn/wrapper
.mvn/wrapper
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.settings.xml
.settings.xml
 
 
.travis.yml
.travis.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Overview

build_status maven_central License

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:

<dependencies>
    ...
    <dependency>
        <groupId>io.appulse</groupId>
        <artifactId>logging-java</artifactId>
        <version>1.1.3</version>
    </dependency>
    ...
</dependencies>

Gradle:

compile 'io.appulse:logging-java:1.1.3'

And use it as usual:

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:

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:

override example

You also could to override default logback's configuration, like an example below.

resources/logback.xml:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>
  <property
    name="CONSOLE_LOG_PATTERN"
    value="${CONSOLE_LOG_PATTERN:-%clr(${LOG_LEVEL_PATTERN:-%5p}) %clr([%25.25thread]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
  />

  <include resource="io/appulse/logging/logback/base.xml"/>
</configuration>

And output will be like:

override example

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.

IMPORTANT: the project requires Java version starting from 8

And, of course, you need to clone the project from GitHub:

$> git clone https://github.com/appulse-projects/logging-java
$> cd logging-java

Building

For building routine automation, I am using maven.

To build the project, do the following:

$> 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:

$> 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:

$> ./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:

$> 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 - is a systems and applications programming language

  • Lombok - is a java library that spicing up your java

  • Junit - is a simple framework to write repeatable tests

  • AssertJ - AssertJ provides a rich set of assertions, truly helpful error messages, improves test code readability

  • Maven - is a software project management and comprehension tool

Changelog

To see what has changed in recent versions of the project, see the changelog file.

Contributing

Please read contributing file for details on my code of conduct, and the process for submitting pull requests to me.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Artem Labazin - creator and the main developer

License

This project is licensed under the Apache License 2.0 License - see the license file for details

About

Logging dependency for Appulse Java projects

Topics

appulsejavalogging

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.