You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
704 B
24 lines
704 B
6 years ago
|
---
|
||
|
layout: page
|
||
|
title: "Debugging"
|
||
5 years ago
|
order: 15
|
||
6 years ago
|
disqus: 1
|
||
6 years ago
|
---
|
||
|
|
||
|
`CameraView` will log a lot of interesting events related to the camera lifecycle. These are important
|
||
|
to identify bugs. The default logger will simply use Android `Log` methods posting to logcat.
|
||
|
|
||
|
You can attach and detach external loggers using `CameraLogger.registerLogger()`:
|
||
|
|
||
|
```java
|
||
|
CameraLogger.registerLogger(new Logger() {
|
||
|
@Override
|
||
|
public void log(@LogLevel int level, String tag, String message, @Nullable Throwable throwable) {
|
||
|
// For example...
|
||
|
Crashlytics.log(message);
|
||
|
}
|
||
|
});
|
||
|
```
|
||
|
|
||
|
Make sure you enable the logger using `CameraLogger.setLogLevel(@LogLevel int)`. The default will only
|
||
|
log error events.
|