verdnatura-chat/app/utils/log.js

12 lines
231 B
JavaScript
Raw Normal View History

import firebase from 'react-native-firebase';
export default (event, error) => {
if (typeof error !== 'object') {
error = { error };
}
firebase.analytics().logEvent(event);
if (__DEV__) {
console.warn(event, error);
}
};