Merge change 21597 into eclair
* changes: Remove tabs; fix formatting
This commit is contained in:
commit
3479356779
@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2009 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* 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 com.android.exchange.utility;
|
package com.android.exchange.utility;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -17,7 +33,7 @@ public class FileLogger {
|
|||||||
return LOGGER;
|
return LOGGER;
|
||||||
}
|
}
|
||||||
|
|
||||||
private FileLogger () {
|
private FileLogger() {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
try {
|
try {
|
||||||
mLogWriter = new FileWriter(LOG_FILE_NAME, true);
|
mLogWriter = new FileWriter(LOG_FILE_NAME, true);
|
||||||
@ -39,7 +55,7 @@ public class FileLogger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
static public synchronized void log (String prefix, String str) {
|
static public synchronized void log(String prefix, String str) {
|
||||||
if (LOGGER == null) {
|
if (LOGGER == null) {
|
||||||
LOGGER = new FileLogger();
|
LOGGER = new FileLogger();
|
||||||
log("Logger", "\r\n\r\n --- New Log ---");
|
log("Logger", "\r\n\r\n --- New Log ---");
|
||||||
@ -49,6 +65,7 @@ public class FileLogger {
|
|||||||
int min = d.getMinutes();
|
int min = d.getMinutes();
|
||||||
int sec = d.getSeconds();
|
int sec = d.getSeconds();
|
||||||
|
|
||||||
|
// I don't use DateFormat here because (in my experience), it's much slower
|
||||||
StringBuffer sb = new StringBuffer(256);
|
StringBuffer sb = new StringBuffer(256);
|
||||||
sb.append('[');
|
sb.append('[');
|
||||||
sb.append(hr);
|
sb.append(hr);
|
||||||
|
Loading…
Reference in New Issue
Block a user