Home Code Other Software

Table of Contents

Introduction

AVSL is a very simple logger, written in Scala. AVSL implements the Simple Logging Facade for Java (SLF4J) API, allowing applications to be written to the SLF4J API. (This, of course, includes Java applications.) Because it implements SLF4J, AVSL can easily be swapped for another SLF4J-compatible logging framework (or the other way around), without any changes to the calling application. Also, because it supports SLF4J, AVSL can be used in conjunction with Scala SLF4J wrappers, such as Grizzled-SLF4J.

“AVSL” stands for “A Very Simple Logger”, and AVSL strives for simplicity in several ways.

In short, AVSL is a perfectly serviceable, simple logging framework that can easily be swapped out for something with more features.

Installation

AVSL is published to the oss.sonatype.org repository; Sonatype automatically pushes the artifacts to the Maven central repository. You can get download the Grizzled Scala library jar directly from the Maven repository. However, if you’re using Maven or SBT, you can just have those tools do the job for you.

Version 0.4 is available for Scala 2.9.2, 2.9.1-1, 2.9.1, 2.9.0-1, 2.9.0, 2.8.2, 2.8.1 and 2.8.0.

Installing for Maven

If you’re using Maven, just give it the artifact, and Maven will do the rest:

For example:

<dependency>
  <groupId>org.clapper</groupId>
  <artifactId>avsl_2.9.1</artifactId>
  <version>0.4</version>
</dependency>

For more information on using Maven and Scala, see Josh Suereth’s Scala Maven Guide.

Using with SBT

0.7.x

If you’re using SBT 0.7.x to compile your code, you can place the following line in your project file (i.e., the Scala file in your project/build/ directory):

val javaNetRepo = "Java.net Maven 2 Repo" at
    "http://download.java.net/maven/2"
val avsl = "org.clapper" %% "avsl" % "0.4"

0.11.x

If you’re using SBT 0.11.x to compile your code, you can use the following line in your build.sbt file (for Quick Configuration). If you’re using an SBT 0.11.x Full Configuration, you’re obviously smart enough to figure out what to do, on your own.

resolvers += "Java.net Maven 2 Repo" at "http://download.java.net/maven/2"
libraryDependencies += "org.clapper" %% "avsl" % "0.4"

AVSL is also registered with Doug Tangren’s excellent ls.implicit.ly catalog. If you use the ls SBT plugin, you can install AVSL with

sbt> ls-install avsl

NOTES

  1. You must specify the Java.net repository. If you don’t explicitly specify the additional repositories listed above, sbt update will fail. See Library Management Maven/Ivy section in the SBT Manual for details. Also see this email thread. Depending on your circumstances, you may also need to specify the dependent repositories used by the Grizzled Scala library.

Source Code Repository

The source code for AVSL is maintained on GitHub. To clone the repository, run this command:

git clone git://github.com/bmc/avsl.git

Building from Source

Building the library requires SBT 0.11.1 or better. Install SBT, as described at the SBT web site. Then, assuming you have an sbt shell script (or .BAT file, for Windows), run:

sbt compile package

The resulting jar file will be in the top-level target directory.

Documentation

Please consult the User’s Guide for details on how to use and configure AVSL.

Change log

The change log for all releases is here.

Author

Brian M. Clapper, bmc@clapper.org

AVSL is copyright © 2010 Brian M. Clapper and is released under a BSD License.

Patches

I gladly accept patches from their original authors. Feel free to email patches to me or to fork the GitHub repository and send me a pull request. Along with any patch you send: