If you think the Android project SysLog listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Copyright (C) 2007 The Android Open Source Project
*/*www.java2s.com*/
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package jackpal.androidterm.emulatorview;
/**
* Debug settings.
*/class EmulatorDebug {
/**
* Set to true to add debugging code and logging.
*/publicstaticfinalboolean DEBUG = false;
/**
* Set to true to log IME calls.
*/publicstaticfinalboolean LOG_IME = DEBUG & false;
/**
* Set to true to log each character received from the remote process to the
* android log, which makes it easier to debug some kinds of problems with
* emulating escape sequences and control codes.
*/publicstaticfinalboolean LOG_CHARACTERS_FLAG = DEBUG & false;
/**
* Set to true to log unknown escape sequences.
*/publicstaticfinalboolean LOG_UNKNOWN_ESCAPE_SEQUENCES = DEBUG & false;
/**
* The tag we use when logging, so that our messages can be distinguished
* from other messages in the log. Public because it's used by several
* classes.
*/publicstaticfinal String LOG_TAG = "EmulatorView";
publicstatic String bytesToString(byte[] data, int base, int length) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < length; i++) {
byte b = data[base + i];
if (b < 32 || b > 126) {
buf.append(String.format("\\x%02x", b));
} else {
buf.append((char)b);
}
}
return buf.toString();
}
}