Skip to content
Snippets Groups Projects
Commit 97068d47 authored by Emmanuel Bourg's avatar Emmanuel Bourg
Browse files

New upstream version 1.3.1

parent 4c0d78a7
Branches upstream
Tags upstream/1.3.1
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/.svn/*" kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
Project license(s): 3-Clause BSD License
* You will only Submit Contributions where You have authored 100% of the content.
* You will only Submit Contributions to which You have the necessary rights. This means that if You are employed You have received the necessary permissions from Your employer to make the Contributions.
* Whatever content You Contribute will be provided under the Project License(s).
......@@ -9,7 +9,7 @@
<groupId>com.esotericsoftware</groupId>
<artifactId>minlog</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<packaging>bundle</packaging>
<name>MinLog</name>
......@@ -18,8 +18,8 @@
<licenses>
<license>
<name>New BSD License</name>
<url>http://www.opensource.org/licenses/bsd-license.php</url>
<name>3-Clause BSD License</name>
<url>https://opensource.org/licenses/BSD-3-Clause</url>
<distribution>repo</distribution>
</license>
</licenses>
......@@ -34,9 +34,9 @@
<scm>
<url>https://github.com/EsotericSoftware/minlog</url>
<connection>scm:git:https://github.com/EsotericSoftware/minlog.git</connection>
<developerConnection>scm:git:https://github.com/EsotericSoftware/minlog.git</developerConnection>
<tag>minlog-1.3.0</tag>
<connection>scm:git:git@github.com:EsotericSoftware/minlog.git</connection>
<developerConnection>scm:git:git@github.com:EsotericSoftware/minlog.git</developerConnection>
<tag>HEAD</tag>
</scm>
<build>
......@@ -71,6 +71,10 @@
</goals>
</execution>
</executions>
<configuration>
<!-- required for java8, so that javadoc errors don't fail the build -->
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
......@@ -90,6 +94,9 @@
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Automatic-Module-Name>com.esotericsoftware.minlog</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
......
......@@ -3,12 +3,9 @@ package com.esotericsoftware.minlog;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Date;
/**
* A low overhead, lightweight logging system.
* @author Nathan Sweet <misc@n4te.com>
*/
/** A low overhead, lightweight logging system.
* @author Nathan Sweet <misc@n4te.com> */
public class Log {
/** No logging at all. */
static public final int LEVEL_NONE = 6;
......@@ -23,10 +20,8 @@ public class Log {
/** Trace messages. A lot of information is logged, so this level is usually only needed when debugging a problem. */
static public final int LEVEL_TRACE = 1;
/**
* The level of messages that will be logged. Compiling this and the booleans below as "final" will cause the compiler to
* remove all "if (Log.info) ..." type statements below the set level.
*/
/** The level of messages that will be logged. Compiling this and the booleans below as "final" will cause the compiler to
* remove all "if (Log.info) ..." type statements below the set level. */
static private int level = LEVEL_INFO;
/** True when the ERROR level will be logged. */
......@@ -40,9 +35,7 @@ public class Log {
/** True when the TRACE level will be logged. */
static public boolean TRACE = level <= LEVEL_TRACE;
/**
* Sets the level to log. If a version of this class is being used that has a final log level, this has no affect.
*/
/** Sets the level to log. If a version of this class is being used that has a final log level, this has no affect. */
static public void set (int level) {
// Comment out method contents when compiling fixed level JARs.
Log.level = level;
......@@ -77,9 +70,7 @@ public class Log {
set(LEVEL_TRACE);
}
/**
* Sets the logger that will write the log messages.
*/
/** Sets the logger that will write the log messages. */
static public void setLogger (Logger logger) {
Log.logger = logger;
}
......@@ -169,17 +160,15 @@ public class Log {
private Log () {
}
/**
* Performs the actual logging. Default implementation logs to System.out. Extended and use {@link Log#logger} set to handle
* logging differently.
*/
/** Performs the actual logging. Default implementation logs to System.out. Extended and use {@link Log#logger} set to handle
* logging differently. */
static public class Logger {
private long firstLogTime = new Date().getTime();
private final long firstLogTime = System.currentTimeMillis();
public void log (int level, String category, String message, Throwable ex) {
StringBuilder builder = new StringBuilder(256);
long time = new Date().getTime() - firstLogTime;
long time = System.currentTimeMillis() - firstLogTime;
long minutes = time / (1000 * 60);
long seconds = time / (1000) % 60;
if (minutes <= 9) builder.append('0');
......@@ -224,9 +213,7 @@ public class Log {
print(builder.toString());
}
/**
* Prints the message to System.out. Called by the default implementation of {@link #log(int, String, String, Throwable)}.
*/
/** Prints the message to System.out. Called by the default implementation of {@link #log(int, String, String, Throwable)}. */
protected void print (String message) {
System.out.println(message);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment