diff options
author | Kenny Root <kenny@the-b.org> | 2013-04-11 21:01:32 -0700 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2013-04-11 21:01:32 -0700 |
commit | d8e49ec3f297f9ba0991762eb2cddbc00ed634d2 (patch) | |
tree | aac59c707c980e90202241c7a9c306ab9d278a1c /src/com/trilead/ssh2/log/Logger.java | |
parent | 847af5046fb7d2dbcc668cecf81f1726b7c48bd9 (diff) | |
download | connectbot-d8e49ec3f297f9ba0991762eb2cddbc00ed634d2.tar.gz connectbot-d8e49ec3f297f9ba0991762eb2cddbc00ed634d2.tar.bz2 connectbot-d8e49ec3f297f9ba0991762eb2cddbc00ed634d2.zip |
Fix line endings
Diffstat (limited to 'src/com/trilead/ssh2/log/Logger.java')
-rw-r--r-- | src/com/trilead/ssh2/log/Logger.java | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/src/com/trilead/ssh2/log/Logger.java b/src/com/trilead/ssh2/log/Logger.java index fe388f7..20ab397 100644 --- a/src/com/trilead/ssh2/log/Logger.java +++ b/src/com/trilead/ssh2/log/Logger.java @@ -1,54 +1,54 @@ -
-package com.trilead.ssh2.log;
-
-import com.trilead.ssh2.DebugLogger;
-
-/**
- * Logger - a very simple logger, mainly used during development.
- * Is not based on log4j (to reduce external dependencies).
- * However, if needed, something like log4j could easily be
- * hooked in.
- * <p>
- * For speed reasons, the static variables are not protected
- * with semaphores. In other words, if you dynamicaly change the
- * logging settings, then some threads may still use the old setting.
- *
- * @author Christian Plattner, plattner@trilead.com
- * @version $Id: Logger.java,v 1.2 2008/03/03 07:01:36 cplattne Exp $
- */
-
-public class Logger
-{
- public static boolean enabled = false;
- public static DebugLogger logger = null;
-
- private String className;
-
- public final static Logger getLogger(Class x)
- {
- return new Logger(x);
- }
-
- public Logger(Class x)
- {
- this.className = x.getName();
- }
-
- public final boolean isEnabled()
- {
- return enabled;
- }
-
- public final void log(int level, String message)
- {
- if (!enabled)
- return;
-
- DebugLogger target = logger;
-
- if (target == null)
- return;
-
- target.log(level, className, message);
- }
-}
+ +package com.trilead.ssh2.log; + +import com.trilead.ssh2.DebugLogger; + +/** + * Logger - a very simple logger, mainly used during development. + * Is not based on log4j (to reduce external dependencies). + * However, if needed, something like log4j could easily be + * hooked in. + * <p> + * For speed reasons, the static variables are not protected + * with semaphores. In other words, if you dynamicaly change the + * logging settings, then some threads may still use the old setting. + * + * @author Christian Plattner, plattner@trilead.com + * @version $Id: Logger.java,v 1.2 2008/03/03 07:01:36 cplattne Exp $ + */ + +public class Logger +{ + public static boolean enabled = false; + public static DebugLogger logger = null; + + private String className; + + public final static Logger getLogger(Class x) + { + return new Logger(x); + } + + public Logger(Class x) + { + this.className = x.getName(); + } + + public final boolean isEnabled() + { + return enabled; + } + + public final void log(int level, String message) + { + if (!enabled) + return; + + DebugLogger target = logger; + + if (target == null) + return; + + target.log(level, className, message); + } +} |