org.slf4gwt:slf4gwt-remote

SLF4J emulation for GWT

License

License

Categories

Categories

GWT (Google Web Toolkit) User Interface Web Frameworks
GroupId

GroupId

org.slf4gwt
ArtifactId

ArtifactId

slf4gwt-remote
Last Version

Last Version

1.4
Release Date

Release Date

Type

Type

jar
Description

Description

SLF4J emulation for GWT

Download slf4gwt-remote

How to add to project

<!-- https://jarcasting.com/artifacts/org.slf4gwt/slf4gwt-remote/ -->
<dependency>
    <groupId>org.slf4gwt</groupId>
    <artifactId>slf4gwt-remote</artifactId>
    <version>1.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.slf4gwt/slf4gwt-remote/
implementation 'org.slf4gwt:slf4gwt-remote:1.4'
// https://jarcasting.com/artifacts/org.slf4gwt/slf4gwt-remote/
implementation ("org.slf4gwt:slf4gwt-remote:1.4")
'org.slf4gwt:slf4gwt-remote:jar:1.4'
<dependency org="org.slf4gwt" name="slf4gwt-remote" rev="1.4">
  <artifact name="slf4gwt-remote" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.slf4gwt', module='slf4gwt-remote', version='1.4')
)
libraryDependencies += "org.slf4gwt" % "slf4gwt-remote" % "1.4"
[org.slf4gwt/slf4gwt-remote "1.4"]

Dependencies

provided (3)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.30
com.google.gwt : gwt-dev jar 2.8.2
com.google.gwt : gwt-user jar 2.8.2

Project Modules

There are no modules declared in this project.

slf4gwt

slf4gwt is a slf4j emulation for GWT. With this project it is possible for a Java developer to use the slf4j API on the GWT client side. So it is possible to use slf4j on server and client code.

Motivation

On server code it is a common practice to use slf4j to hide the used logging framework. On GWT client side slf4j cannot be used and so it is up to the developer to keep an eye on her code and check where it runs. Especially shared code is a problem here. The solution for the problem is slf4gwt and the slf4j api is used on client and server side.

Like the well-known slf4j, sl4fgwt uses a logging framework to write the logging messages. GWT provides a java.util.logging implementation, and we use this implementation to write the messages to the right appender.

Inspiration

slf4gwt is inspired by some other open source projects. The most important one is gwt-log the former number one logging framework for GWT. It was used before GWT 2.1 very often. Next we like slf4j-gwt a lot but the implementation stopped some years ago, and slf4gwt likes to bridge the gap and provide a state of the art version, that can be used with the current GWT implementations.

Usage

First you need to import the jar into your project.

<dependency>
    <groupId>org.slf4gwt</groupId>
    <artifactId>slf4gwt</artifactId>
    <version>1.4</version>
</dependency>

Then add the logging module to your module (*.gwt.xml):

<inherits name="org.slf4jgwt.logging.gwt.Logging"/>

You can also set logging level (TRACE, DEBUG, INFO, WARN, ERROR):

<set-property name="slf4gwt.log.level" value="INFO"/>

And you can configure the used appenders:

<set-property name="slf4gwt.log.handler.console" value="ENABLED" />
<set-property name="slf4gwt.log.handler.developmentMode" value="ENABLED" />
<set-property name="slf4gwt.log.handler.hasWidgets" value="DISABLED" />
<set-property name="slf4gwt.log.handler.system" value="DISABLED" />
<set-property name="slf4gwt.log.handler.simpleRemote" value="DISABLED" />

Logging in development and production mode:

Normally the logging is enabled in development mode and disabled in production mode. If you need to get logs on production mode, you have to enable the GWT logging as defined on the GWT logging manual. Or simply add this line to you *.gwt.xml file:

<set-property name="gwt.logging.enabled" value="TRUE"/>

Possible values are TRUE, WARNING, SEVERE and FALSE (if you don't need any logging at all).

org.slf4gwt

slf4gwt

Versions

Version
1.4