verdnatura-chat/app/utils/log.js

12 lines
231 B
JavaScript

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);
}
};