Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/log/Logger.java @ 342:175c7d68f3c4
merge ganymed into mainline
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 31 Jul 2014 16:33:38 -0700 |
parents | d835e842d158 |
children | adab27dd4598 |
comparison
equal
deleted
inserted
replaced
272:ce2f4e397703 | 342:175c7d68f3c4 |
---|---|
1 /* | |
2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved. | |
3 * Please refer to the LICENSE.txt for licensing details. | |
4 */ | |
5 | |
6 package ch.ethz.ssh2.log; | |
7 | |
8 import android.util.Log; | |
9 | |
10 public class Logger { | |
11 private static final String TAG = "ConnectBot.ssh"; | |
12 public static boolean enabled = true; | |
13 | |
14 public static Logger getLogger(Class<?> x) { | |
15 return new Logger(); | |
16 } | |
17 | |
18 public Logger() { | |
19 } | |
20 | |
21 public final boolean isEnabled() { | |
22 return enabled; | |
23 } | |
24 | |
25 public boolean isDebugEnabled() { | |
26 return enabled; | |
27 } | |
28 | |
29 public void debug(String message) { | |
30 if (enabled) Log.d(TAG, message); | |
31 } | |
32 | |
33 public boolean isInfoEnabled() { | |
34 return enabled; | |
35 } | |
36 | |
37 public void info(String message) { | |
38 if (enabled) Log.i(TAG, message); | |
39 } | |
40 | |
41 public boolean isWarningEnabled() { | |
42 return enabled; | |
43 } | |
44 | |
45 public void warning(String message) { | |
46 if (enabled) Log.w(TAG, message); | |
47 } | |
48 } |