diff --git a/app/containers/MessageActions.js b/app/containers/MessageActions.js
index 8b8c323c..05f6ff74 100644
--- a/app/containers/MessageActions.js
+++ b/app/containers/MessageActions.js
@@ -308,7 +308,7 @@ export default class MessageActions extends React.Component {
await RocketChat.reportMessage(actionMessage._id);
Alert.alert(I18n.t('Message_Reported'));
} catch (err) {
- log('report message', err);
+ log('err_report_message', err);
}
}
diff --git a/app/containers/MessageBox/index.js b/app/containers/MessageBox/index.js
index ba07f598..c0753c40 100644
--- a/app/containers/MessageBox/index.js
+++ b/app/containers/MessageBox/index.js
@@ -290,7 +290,7 @@ class MessageBox extends Component {
try {
database.create('users', user, true);
} catch (e) {
- log('create users', e);
+ log('err_create_users', e);
}
});
});
@@ -414,7 +414,7 @@ class MessageBox extends Component {
try {
await RocketChat.sendFileMessage(rid, fileInfo, tmid);
} catch (e) {
- log('sendImageMessage', e);
+ log('err_send_image', e);
}
}
@@ -423,7 +423,7 @@ class MessageBox extends Component {
const image = await ImagePicker.openCamera(imagePickerConfig);
this.showUploadModal(image);
} catch (e) {
- log('takePhoto', e);
+ log('err_take_photo', e);
}
}
@@ -432,7 +432,7 @@ class MessageBox extends Component {
const image = await ImagePicker.openPicker(imagePickerConfig);
this.showUploadModal(image);
} catch (e) {
- log('chooseFromLibrary', e);
+ log('err_choose_from_library', e);
}
}
@@ -492,7 +492,7 @@ class MessageBox extends Component {
if (e && e.error === 'error-file-too-large') {
return Alert.alert(I18n.t(e.error));
}
- log('finishAudioMessage', e);
+ log('err_finish_audio_message', e);
}
}
}
diff --git a/app/lib/methods/getCustomEmojis.js b/app/lib/methods/getCustomEmojis.js
index 9fa741f8..be2701f6 100644
--- a/app/lib/methods/getCustomEmojis.js
+++ b/app/lib/methods/getCustomEmojis.js
@@ -66,7 +66,7 @@ export default async function() {
database.delete(emojiRecord);
}
} catch (e) {
- log('getEmojis delete', e);
+ log('err_get_emojis_delete', e);
}
});
}
@@ -74,6 +74,6 @@ export default async function() {
);
}
} catch (e) {
- log('getCustomEmojis', e);
+ log('err_get_custom_emojis', e);
}
}
diff --git a/app/lib/methods/getPermissions.js b/app/lib/methods/getPermissions.js
index eaa9da08..c4d4a860 100644
--- a/app/lib/methods/getPermissions.js
+++ b/app/lib/methods/getPermissions.js
@@ -16,7 +16,7 @@ const create = (permissions) => {
try {
database.create('permissions', permission, true);
} catch (e) {
- log('getPermissions create', e);
+ log('err_get_permissions_create', e);
}
});
}
@@ -63,7 +63,7 @@ export default async function() {
database.delete(permission);
}
} catch (e) {
- log('getPermissions delete', e);
+ log('err_get_permissions_delete', e);
}
});
}
@@ -71,6 +71,6 @@ export default async function() {
);
}
} catch (e) {
- log('getPermissions', e);
+ log('err_get_permissions', e);
}
}
diff --git a/app/lib/methods/getRoles.js b/app/lib/methods/getRoles.js
index c5ba86c1..6b7a06da 100644
--- a/app/lib/methods/getRoles.js
+++ b/app/lib/methods/getRoles.js
@@ -20,12 +20,12 @@ export default async function() {
try {
database.create('roles', role, true);
} catch (e) {
- log('getRoles create', e);
+ log('err_get_roles_create', e);
}
}));
});
}
} catch (e) {
- log('getRoles', e);
+ log('err_get_roles', e);
}
}
diff --git a/app/lib/methods/getSettings.js b/app/lib/methods/getSettings.js
index 2b0f5f2a..c751b518 100644
--- a/app/lib/methods/getSettings.js
+++ b/app/lib/methods/getSettings.js
@@ -11,7 +11,7 @@ function updateServer(param) {
try {
database.databases.serversDB.create('servers', { id: reduxStore.getState().server.server, ...param }, true);
} catch (e) {
- log('updateServer', e);
+ log('err_get_settings_update_server', e);
}
});
}
@@ -34,7 +34,7 @@ export default async function() {
try {
database.create('settings', { ...setting, _updatedAt: new Date() }, true);
} catch (e) {
- log('create settings', e);
+ log('err_get_settings_create', e);
}
if (setting._id === 'Site_Name') {
@@ -52,6 +52,6 @@ export default async function() {
updateServer.call(this, { iconURL });
}
} catch (e) {
- log('getSettings', e);
+ log('err_get_settings', e);
}
}
diff --git a/app/lib/methods/loadMessagesForRoom.js b/app/lib/methods/loadMessagesForRoom.js
index e24151a8..dcca7dd8 100644
--- a/app/lib/methods/loadMessagesForRoom.js
+++ b/app/lib/methods/loadMessagesForRoom.js
@@ -52,7 +52,7 @@ export default function loadMessagesForRoom(...args) {
database.create('threadMessages', message, true);
}
} catch (e) {
- log('loadMessagesForRoom -> create messages', e);
+ log('err_load_messages_for_room_create', e);
}
}));
return resolve(data);
@@ -61,7 +61,7 @@ export default function loadMessagesForRoom(...args) {
return resolve([]);
}
} catch (e) {
- log('loadMessagesForRoom', e);
+ log('err_load_messages_for_room', e);
reject(e);
}
});
diff --git a/app/lib/methods/loadMissedMessages.js b/app/lib/methods/loadMissedMessages.js
index e0d261a4..4bc885b8 100644
--- a/app/lib/methods/loadMissedMessages.js
+++ b/app/lib/methods/loadMissedMessages.js
@@ -45,7 +45,7 @@ export default function loadMissedMessages(...args) {
database.create('threadMessages', message, true);
}
} catch (e) {
- log('loadMissedMessages -> create messages', e);
+ log('err_load_missed_messages_create', e);
}
}));
});
@@ -65,14 +65,14 @@ export default function loadMissedMessages(...args) {
});
});
} catch (e) {
- log('loadMissedMessages -> delete message', e);
+ log('err_load_missed_messages_delete', e);
}
});
}
}
resolve();
} catch (e) {
- log('loadMissedMessages', e);
+ log('err_load_missed_messages', e);
reject(e);
}
});
diff --git a/app/lib/methods/loadThreadMessages.js b/app/lib/methods/loadThreadMessages.js
index 7412ef0a..ee6cf7ac 100644
--- a/app/lib/methods/loadThreadMessages.js
+++ b/app/lib/methods/loadThreadMessages.js
@@ -34,7 +34,7 @@ export default function loadThreadMessages({ tmid, offset = 0 }) {
message.rid = tmid;
database.create('threadMessages', message, true);
} catch (e) {
- log('loadThreadMessages -> create messages', e);
+ log('err_load_thread_messages_create', e);
}
}));
return resolve(data);
@@ -43,7 +43,7 @@ export default function loadThreadMessages({ tmid, offset = 0 }) {
return resolve([]);
}
} catch (e) {
- log('loadThreadMessages', e);
+ log('err_load_thread_messages', e);
reject(e);
}
});
diff --git a/app/lib/methods/readMessages.js b/app/lib/methods/readMessages.js
index 25d21377..10a9b14a 100644
--- a/app/lib/methods/readMessages.js
+++ b/app/lib/methods/readMessages.js
@@ -18,6 +18,6 @@ export default async function readMessages(rid) {
});
return data;
} catch (e) {
- log('readMessages', e);
+ log('err_read_messages', e);
}
}
diff --git a/app/lib/methods/sendFileMessage.js b/app/lib/methods/sendFileMessage.js
index b0427723..57d0f9a1 100644
--- a/app/lib/methods/sendFileMessage.js
+++ b/app/lib/methods/sendFileMessage.js
@@ -51,7 +51,7 @@ export async function sendFileMessage(rid, fileInfo, tmid) {
try {
database.create('uploads', fileInfo, true);
} catch (e) {
- return log('sendFileMessage -> create uploads 1', e);
+ return log('err_send_file_message_create_upload_1', e);
}
});
@@ -69,7 +69,7 @@ export async function sendFileMessage(rid, fileInfo, tmid) {
try {
database.create('uploads', fileInfo, true);
} catch (e) {
- return log('sendFileMessage -> create uploads 2', e);
+ return log('err_send_file_message_create_upload_2', e);
}
});
});
@@ -95,7 +95,7 @@ export async function sendFileMessage(rid, fileInfo, tmid) {
try {
database.delete(upload);
} catch (e) {
- log('sendFileMessage -> delete uploads', e);
+ log('err_send_file_message_delete_upload', e);
}
});
} catch (e) {
@@ -104,7 +104,7 @@ export async function sendFileMessage(rid, fileInfo, tmid) {
try {
database.create('uploads', fileInfo, true);
} catch (err) {
- log('sendFileMessage -> create uploads 3', err);
+ log('err_send_file_message_create_upload_3', err);
}
});
}
diff --git a/app/lib/methods/sendMessage.js b/app/lib/methods/sendMessage.js
index 7545349e..eae4a824 100644
--- a/app/lib/methods/sendMessage.js
+++ b/app/lib/methods/sendMessage.js
@@ -66,6 +66,6 @@ export default async function(rid, msg, tmid) {
});
}
} catch (e) {
- log('sendMessage', e);
+ log('err_send_message', e);
}
}
diff --git a/app/lib/methods/subscriptions/room.js b/app/lib/methods/subscriptions/room.js
index 4c5c4c37..e681fbaa 100644
--- a/app/lib/methods/subscriptions/room.js
+++ b/app/lib/methods/subscriptions/room.js
@@ -63,7 +63,7 @@ export default function subscribeRoom({ rid }) {
typingTimeouts[username] = null;
}
} catch (error) {
- console.log('TCL: removeUserTyping -> error', error);
+ log('err_remove_user_typing', error);
}
};
@@ -85,7 +85,7 @@ export default function subscribeRoom({ rid }) {
removeUserTyping(username);
}, 10000);
} catch (error) {
- console.log('TCL: addUserTyping -> error', error);
+ log('err_add_user_typing', error);
}
}
};
@@ -198,7 +198,7 @@ export default function subscribeRoom({ rid }) {
try {
promises = this.sdk.subscribeRoom(rid);
} catch (e) {
- log('subscribeRoom', e);
+ log('err_subscribe_room', e);
}
return {
diff --git a/app/lib/methods/subscriptions/rooms.js b/app/lib/methods/subscriptions/rooms.js
index b02edbc4..aee57b1e 100644
--- a/app/lib/methods/subscriptions/rooms.js
+++ b/app/lib/methods/subscriptions/rooms.js
@@ -59,7 +59,7 @@ export default async function subscribeRooms() {
database.delete(subscription);
});
} catch (e) {
- log('handleStreamMessageReceived -> subscriptions removed', e);
+ log('err_stream_msg_received_sub_removed', e);
}
} else {
const rooms = database.objects('rooms').filtered('_id == $0', data.rid);
@@ -70,7 +70,7 @@ export default async function subscribeRooms() {
database.delete(rooms);
});
} catch (e) {
- log('handleStreamMessageReceived -> subscriptions updated', e);
+ log('err_stream_msg_received_sub_updated', e);
}
}
}
@@ -83,7 +83,7 @@ export default async function subscribeRooms() {
database.create('subscriptions', tmp, true);
});
} catch (e) {
- log('handleStreamMessageReceived -> rooms updated', e);
+ log('err_stream_msg_received_room_updated', e);
}
} else if (type === 'inserted') {
try {
@@ -91,7 +91,7 @@ export default async function subscribeRooms() {
database.create('rooms', data, true);
});
} catch (e) {
- log('handleStreamMessageReceived -> rooms inserted', e);
+ log('err_stream_msg_received_room_inserted', e);
}
}
}
@@ -116,7 +116,7 @@ export default async function subscribeRooms() {
database.create('messages', message, true);
});
} catch (e) {
- log('handleStreamMessageReceived -> message', e);
+ log('err_stream_msg_received_message', e);
}
});
}
@@ -146,7 +146,7 @@ export default async function subscribeRooms() {
try {
await this.sdk.subscribeNotifyUser();
} catch (e) {
- log('subscribeRooms', e);
+ log('err_subscribe_rooms', e);
}
return {
diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js
index e83c3b5e..e4f85cba 100644
--- a/app/lib/rocketchat.js
+++ b/app/lib/rocketchat.js
@@ -96,7 +96,7 @@ const RocketChat = {
return result;
}
} catch (e) {
- log('getServerInfo', e);
+ log('err_get_server_info', e);
}
return {
success: false,
@@ -387,7 +387,7 @@ const RocketChat = {
database.create('messages', message, true);
});
} catch (e) {
- log('resendMessage error', e);
+ log('err_resend_message', e);
}
}
},
@@ -514,7 +514,7 @@ const RocketChat = {
try {
room = await RocketChat.getRoom(message.rid);
} catch (e) {
- log('Rocketchat.getPermalink', e);
+ log('err_get_permalink', e);
return null;
}
const { server } = reduxStore.getState().server;
diff --git a/app/sagas/init.js b/app/sagas/init.js
index cf15cbc2..4d92b3fa 100644
--- a/app/sagas/init.js
+++ b/app/sagas/init.js
@@ -38,7 +38,7 @@ const restore = function* restore() {
yield put(actions.appReady({}));
} catch (e) {
- log('restore', e);
+ log('err_restore', e);
}
};
diff --git a/app/sagas/login.js b/app/sagas/login.js
index 86e92301..28c72321 100644
--- a/app/sagas/login.js
+++ b/app/sagas/login.js
@@ -80,7 +80,7 @@ const handleLogout = function* handleLogout() {
yield put(appStart('outside'));
} catch (e) {
yield put(appStart('outside'));
- log('handleLogout', e);
+ log('err_handle_logout', e);
}
}
};
diff --git a/app/sagas/messages.js b/app/sagas/messages.js
index 0fb79a32..af90e383 100644
--- a/app/sagas/messages.js
+++ b/app/sagas/messages.js
@@ -77,7 +77,7 @@ const handleReplyBroadcast = function* handleReplyBroadcast({ message }) {
yield delay(500);
yield put(replyInit(message, false));
} catch (e) {
- log('handleReplyBroadcast', e);
+ log('err_reply_broadcast', e);
}
};
diff --git a/app/sagas/room.js b/app/sagas/room.js
index 0319b26e..95015318 100644
--- a/app/sagas/room.js
+++ b/app/sagas/room.js
@@ -24,7 +24,7 @@ const watchUserTyping = function* watchUserTyping({ rid, status }) {
yield RocketChat.emitTyping(rid, false);
}
} catch (e) {
- log('watchUserTyping', e);
+ log('err_watch_user_typing', e);
}
};
diff --git a/app/sagas/rooms.js b/app/sagas/rooms.js
index 86ca7ee4..ad5d862f 100644
--- a/app/sagas/rooms.js
+++ b/app/sagas/rooms.js
@@ -23,7 +23,7 @@ const handleRoomsRequest = function* handleRoomsRequest() {
try {
database.create('subscriptions', subscription, true);
} catch (error) {
- log('handleRoomsRequest create sub', error);
+ log('err_rooms_request_create_sub', error);
}
});
});
@@ -31,14 +31,14 @@ const handleRoomsRequest = function* handleRoomsRequest() {
try {
database.databases.serversDB.create('servers', { id: server, roomsUpdatedAt: newRoomsUpdatedAt }, true);
} catch (e) {
- log('handleRoomsRequest update roomsUpdatedAt', e);
+ log('err_rooms_request_update', e);
}
});
yield put(roomsSuccess());
} catch (e) {
yield put(roomsFailure(e));
- log('handleRoomsRequest', e);
+ log('err_rooms_request', e);
}
};
diff --git a/app/sagas/selectServer.js b/app/sagas/selectServer.js
index 13d25c27..f5315e64 100644
--- a/app/sagas/selectServer.js
+++ b/app/sagas/selectServer.js
@@ -26,7 +26,7 @@ const getServerInfo = function* getServerInfo({ server }) {
return serverInfo;
} catch (e) {
- log('getServerInfo', e);
+ log('err_get_server_info', e);
}
};
@@ -54,7 +54,7 @@ const handleSelectServer = function* handleSelectServer({ server, version, fetch
yield put(selectServerSuccess(server, fetchVersion ? serverInfo && serverInfo.version : version));
} catch (e) {
- log('handleSelectServer', e);
+ log('err_select_server', e);
}
};
@@ -73,7 +73,7 @@ const handleServerRequest = function* handleServerRequest({ server }) {
yield put(selectServerRequest(server, serverInfo.version, false));
} catch (e) {
yield put(serverFailure());
- log('handleServerRequest', e);
+ log('err_server_request', e);
}
};
diff --git a/app/sagas/state.js b/app/sagas/state.js
index fa6adc59..27b09483 100644
--- a/app/sagas/state.js
+++ b/app/sagas/state.js
@@ -3,6 +3,7 @@ import { FOREGROUND, BACKGROUND } from 'redux-enhancer-react-native-appstate';
import RocketChat from '../lib/rocketchat';
import { setBadgeCount } from '../push';
+import log from '../utils/log';
const appHasComeBackToForeground = function* appHasComeBackToForeground() {
const appRoot = yield select(state => state.app.root);
@@ -17,7 +18,7 @@ const appHasComeBackToForeground = function* appHasComeBackToForeground() {
setBadgeCount();
return yield RocketChat.setUserPresenceOnline();
} catch (e) {
- console.log('appHasComeBackToForeground', e);
+ log('err_app_has_come_back_to_foreground', e);
}
};
@@ -33,7 +34,7 @@ const appHasComeBackToBackground = function* appHasComeBackToBackground() {
try {
return yield RocketChat.setUserPresenceAway();
} catch (e) {
- console.log('appHasComeBackToBackground', e);
+ log('err_app_has_come_back_to_background', e);
}
};
diff --git a/app/utils/events.js b/app/utils/events.js
index 1e9df675..a002ce98 100644
--- a/app/utils/events.js
+++ b/app/utils/events.js
@@ -31,7 +31,7 @@ class EventEmitter {
try {
listener.apply(this, args);
} catch (e) {
- log('EventEmitter.emit', e);
+ log('err_emit', e);
}
});
}
diff --git a/app/views/ProfileView/index.js b/app/views/ProfileView/index.js
index e5cd0235..b4a02f4f 100644
--- a/app/views/ProfileView/index.js
+++ b/app/views/ProfileView/index.js
@@ -75,7 +75,7 @@ export default class ProfileView extends React.Component {
const result = await RocketChat.getAvatarSuggestion();
this.setState({ avatarSuggestions: result });
} catch (e) {
- log('getAvatarSuggestion', e);
+ log('err_get_avatar_suggestion', e);
}
}
@@ -152,7 +152,7 @@ export default class ProfileView extends React.Component {
return showErrorAlert(e.data.error);
}
showErrorAlert(I18n.t('There_was_an_error_while_action', { action: I18n.t(action) }));
- log(func, e);
+ // log(func, e);
}
submit = async() => {
diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js
index 9c6a82e1..9a3057ca 100644
--- a/app/views/RoomActionsView/index.js
+++ b/app/views/RoomActionsView/index.js
@@ -73,7 +73,7 @@ export default class RoomActionsView extends React.Component {
this.setState({ room: { ...result.channel, rid: result.channel._id } });
}
} catch (error) {
- console.log('RoomActionsView -> getChannelInfo -> error', error);
+ log('err_get_channel_info', error);
}
}
@@ -84,7 +84,7 @@ export default class RoomActionsView extends React.Component {
this.setState({ membersCount: counters.members, joined: counters.joined });
}
} catch (error) {
- console.log('RoomActionsView -> getRoomCounters -> error', error);
+ log('err_get_room_counters', error);
}
} else if (room.t === 'd') {
this.updateRoomMember();
@@ -335,7 +335,7 @@ export default class RoomActionsView extends React.Component {
this.setState({ member: result.user });
}
} catch (e) {
- log('RoomActions updateRoomMember', e);
+ log('err_update_room_member', e);
this.setState({ member: {} });
}
}
@@ -347,7 +347,7 @@ export default class RoomActionsView extends React.Component {
try {
RocketChat.toggleBlockUser(rid, member._id, !blocker);
} catch (e) {
- log('toggleBlockUser', e);
+ log('err_toggle_block_user', e);
}
}
@@ -380,7 +380,7 @@ export default class RoomActionsView extends React.Component {
};
RocketChat.saveNotificationSettings(room.rid, notifications);
} catch (e) {
- log('toggleNotifications', e);
+ log('err_toggle_notifications', e);
}
}
diff --git a/app/views/RoomInfoEditView/index.js b/app/views/RoomInfoEditView/index.js
index 6d163b30..ebade23b 100644
--- a/app/views/RoomInfoEditView/index.js
+++ b/app/views/RoomInfoEditView/index.js
@@ -207,7 +207,7 @@ export default class RoomInfoEditView extends React.Component {
this.setState({ nameError: e });
}
error = true;
- log('saveRoomSettings', e);
+ log('err_save_room_settings', e);
}
await this.setState({ saving: false });
@@ -262,7 +262,7 @@ export default class RoomInfoEditView extends React.Component {
try {
await RocketChat.toggleArchiveRoom(rid, t, !archived);
} catch (e) {
- log('toggleArchive', e);
+ log('err_toggle_archive', e);
}
}
}
diff --git a/app/views/RoomInfoView/index.js b/app/views/RoomInfoView/index.js
index 8f03ad6d..2095d577 100644
--- a/app/views/RoomInfoView/index.js
+++ b/app/views/RoomInfoView/index.js
@@ -98,7 +98,7 @@ export default class RoomInfoView extends React.Component {
this.setState({ roomUser: result.user });
}
} catch (error) {
- log('RoomInfoView.getUserInfo', error);
+ log('err_get_user_info', error);
}
}
}
diff --git a/app/views/RoomMembersView/index.js b/app/views/RoomMembersView/index.js
index fae11395..793a21bd 100644
--- a/app/views/RoomMembersView/index.js
+++ b/app/views/RoomMembersView/index.js
@@ -144,7 +144,7 @@ export default class RoomMembersView extends React.Component {
}
}
} catch (e) {
- log('onPressUser', e);
+ log('err_on_press_user', e);
}
}
@@ -175,7 +175,7 @@ export default class RoomMembersView extends React.Component {
this.fetchMembers();
});
} catch (e) {
- log('RoomMembers.toggleStatus', e);
+ log('err_toggle_status', e);
}
}
@@ -210,7 +210,7 @@ export default class RoomMembersView extends React.Component {
});
navigation.setParams({ allUsers });
} catch (error) {
- console.log('TCL: fetchMembers -> error', error);
+ log('err_fetch_members, error');
this.setState({ isLoading: false });
}
}
@@ -234,7 +234,7 @@ export default class RoomMembersView extends React.Component {
await RocketChat.toggleMuteUserInRoom(rid, userLongPressed.username, !userLongPressed.muted);
this.toast.show(I18n.t('User_has_been_key', { key: userLongPressed.muted ? I18n.t('unmuted') : I18n.t('muted') }));
} catch (e) {
- log('handleMute', e);
+ log('err_handle_mute', e);
}
}
diff --git a/app/views/RoomView/List.js b/app/views/RoomView/List.js
index 0a133107..09895f0c 100644
--- a/app/views/RoomView/List.js
+++ b/app/views/RoomView/List.js
@@ -105,7 +105,7 @@ export class List extends React.PureComponent {
this.setState({ end: result.length < 50, loading: false });
} catch (e) {
this.setState({ loading: false });
- log('ListView.onEndReached', e);
+ log('err_list_view_on_end_reached', e);
}
}, 300)
diff --git a/app/views/RoomView/UploadProgress.js b/app/views/RoomView/UploadProgress.js
index c79f19da..30aa95ca 100644
--- a/app/views/RoomView/UploadProgress.js
+++ b/app/views/RoomView/UploadProgress.js
@@ -111,7 +111,7 @@ export default class UploadProgress extends Component {
try {
database.write(() => database.delete(uploadItem[0]));
} catch (e) {
- log('UploadProgess.deleteUpload', e);
+ log('err_upload_progress_delete', e);
}
}
@@ -119,7 +119,7 @@ export default class UploadProgress extends Component {
try {
await RocketChat.cancelUpload(item.path);
} catch (e) {
- log('UploadProgess.cancelUpload', e);
+ log('err_upload_progress_cancel', e);
}
}
@@ -132,7 +132,7 @@ export default class UploadProgress extends Component {
});
await RocketChat.sendFileMessage(rid, item);
} catch (e) {
- log('UploadProgess.tryAgain', e);
+ log('err_upload_progress_try_again', e);
}
}
diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js
index 23c3be21..af06aac4 100644
--- a/app/views/RoomView/index.js
+++ b/app/views/RoomView/index.js
@@ -298,8 +298,7 @@ export default class RoomView extends React.Component {
}
});
} catch (e) {
- console.log('TCL: init -> e', e);
- log('RoomView.init', e);
+ log('err_room_init', e);
}
}
@@ -325,7 +324,7 @@ export default class RoomView extends React.Component {
}
RocketChat.setReaction(shortname, messageId);
} catch (e) {
- log('RoomView.onReactionPress', e);
+ log('err_room_on_reaction_press', e);
}
};
@@ -420,8 +419,7 @@ export default class RoomView extends React.Component {
}
return Promise.resolve();
} catch (e) {
- console.log('TCL: getMessages -> e', e);
- log('getMessages', e);
+ log('err_get_messages', e);
}
}
@@ -429,8 +427,7 @@ export default class RoomView extends React.Component {
try {
return RocketChat.loadThreadMessages({ tmid: this.tmid });
} catch (e) {
- console.log('TCL: getThreadMessages -> e', e);
- log('getThreadMessages', e);
+ log('err_get_thread_messages', e);
}
}
@@ -445,7 +442,7 @@ export default class RoomView extends React.Component {
});
}
} catch (e) {
- log('joinRoom', e);
+ log('err_join_room', e);
}
};
@@ -486,7 +483,7 @@ export default class RoomView extends React.Component {
database.create('threads', buildMessage(EJSON.fromJSONValue(thread)), true);
});
} catch (error) {
- console.log('TCL: fetchThreadName -> error', error);
+ log('err_fetch_thread_name', error);
}
}
@@ -495,8 +492,7 @@ export default class RoomView extends React.Component {
await RocketChat.toggleFollowMessage(this.tmid, !isFollowingThread);
this.toast.show(isFollowingThread ? 'Unfollowed thread' : 'Following thread');
} catch (e) {
- console.log('TCL: RightButtonsContainer -> toggleFollowThread -> e', e);
- log('toggleFollowThread', e);
+ log('err_toggle_follow_thread', e);
}
}
diff --git a/app/views/RoomsListView/SortDropdown.js b/app/views/RoomsListView/SortDropdown.js
index d83bd036..ea7efaef 100644
--- a/app/views/RoomsListView/SortDropdown.js
+++ b/app/views/RoomsListView/SortDropdown.js
@@ -63,7 +63,7 @@ export default class Sort extends PureComponent {
setSortPreference(param);
RocketChat.saveSortPreference(param);
} catch (e) {
- log('RoomsListView.setSortPreference', e);
+ log('err_set_sort_preference', e);
}
}
diff --git a/app/views/RoomsListView/index.js b/app/views/RoomsListView/index.js
index 4cf2e91d..62c7ce1b 100644
--- a/app/views/RoomsListView/index.js
+++ b/app/views/RoomsListView/index.js
@@ -360,7 +360,7 @@ export default class RoomsListView extends React.Component {
return this.goRoom({ rid: result.room._id, name: username, t: 'd' });
}
} catch (e) {
- log('RoomsListView._onPressItem', e);
+ log('err_on_press_item', e);
}
} else {
return this.goRoom(item);
diff --git a/app/views/SearchMessagesView/index.js b/app/views/SearchMessagesView/index.js
index 9f75ef23..ab98b8c8 100644
--- a/app/views/SearchMessagesView/index.js
+++ b/app/views/SearchMessagesView/index.js
@@ -15,6 +15,7 @@ import Message from '../../containers/message/Message';
import scrollPersistTaps from '../../utils/scrollPersistTaps';
import I18n from '../../i18n';
import StatusBar from '../../containers/StatusBar';
+import log from '../../utils/log';
@connect(state => ({
baseUrl: state.settings.Site_Url || state.server ? state.server.server : '',
@@ -81,7 +82,7 @@ export default class SearchMessagesView extends React.Component {
}
} catch (error) {
this.setState({ loading: false });
- console.log('SearchMessagesView -> search -> catch -> error', error);
+ log('err_search_messages', error);
}
}, 1000)
diff --git a/app/views/SelectedUsersView.js b/app/views/SelectedUsersView.js
index 38c25507..85451101 100644
--- a/app/views/SelectedUsersView.js
+++ b/app/views/SelectedUsersView.js
@@ -132,7 +132,7 @@ export default class SelectedUsersView extends React.Component {
await RocketChat.addUsersToRoom(rid);
navigation.pop();
} catch (e) {
- log('RoomActions Add User', e);
+ log('err_add_user', e);
} finally {
setLoadingInvite(false);
}
diff --git a/app/views/SetUsernameView.js b/app/views/SetUsernameView.js
index 6d2d6e25..0af5163b 100644
--- a/app/views/SetUsernameView.js
+++ b/app/views/SetUsernameView.js
@@ -16,6 +16,7 @@ import scrollPersistTaps from '../utils/scrollPersistTaps';
import I18n from '../i18n';
import RocketChat from '../lib/rocketchat';
import StatusBar from '../containers/StatusBar';
+import log from '../utils/log';
const styles = StyleSheet.create({
loginTitle: {
@@ -97,7 +98,7 @@ export default class SetUsernameView extends React.Component {
await RocketChat.setUsername(username);
await loginRequest({ resume: token });
} catch (e) {
- console.log('SetUsernameView -> catch -> e', e);
+ log('err_submit_username', e);
}
this.setState({ saving: false });
}
diff --git a/app/views/SettingsView/index.js b/app/views/SettingsView/index.js
index 06d3dd3e..39e4dd5e 100644
--- a/app/views/SettingsView/index.js
+++ b/app/views/SettingsView/index.js
@@ -162,7 +162,7 @@ export default class SettingsView extends React.Component {
this.setState({ saving: false });
setTimeout(() => {
showErrorAlert(I18n.t('There_was_an_error_while_action', { action: I18n.t('saving_preferences') }));
- log('saveUserPreferences', e);
+ log('err_save_user_preferences', e);
}, 300);
}
}
diff --git a/app/views/SidebarView/index.js b/app/views/SidebarView/index.js
index 4394b82e..c2de3dd8 100644
--- a/app/views/SidebarView/index.js
+++ b/app/views/SidebarView/index.js
@@ -172,7 +172,7 @@ export default class Sidebar extends Component {
try {
RocketChat.setUserPresenceDefaultStatus(item.id);
} catch (e) {
- log('setUserPresenceDefaultStatus', e);
+ log('err_set_user_presence_default_status', e);
}
}
}}
diff --git a/app/views/ThreadMessagesView/index.js b/app/views/ThreadMessagesView/index.js
index f575d3f5..b8d9f7ac 100644
--- a/app/views/ThreadMessagesView/index.js
+++ b/app/views/ThreadMessagesView/index.js
@@ -115,7 +115,7 @@ export default class ThreadMessagesView extends React.Component {
try {
database.create('threads', buildMessage(message), true);
} catch (e) {
- log('ThreadMessagesView -> load -> create', e);
+ log('err_thread_messages_create', e);
}
}));
@@ -126,7 +126,7 @@ export default class ThreadMessagesView extends React.Component {
});
}
} catch (error) {
- console.log('ThreadMessagesView -> load -> error', error);
+ log('err_thread_messages_load', error);
this.setState({ loading: false, end: true });
}
}, 300)
@@ -148,7 +148,7 @@ export default class ThreadMessagesView extends React.Component {
try {
database.create('threads', buildMessage(message), true);
} catch (e) {
- log('ThreadMessagesView -> sync -> update', e);
+ log('err_thread_messages_update', e);
}
});
}
@@ -160,7 +160,7 @@ export default class ThreadMessagesView extends React.Component {
try {
database.delete(oldMessage);
} catch (e) {
- log('ThreadMessagesView -> sync -> delete', e);
+ log('err_thread_messages_delete', e);
}
}
});
@@ -173,7 +173,7 @@ export default class ThreadMessagesView extends React.Component {
});
}
} catch (error) {
- console.log('ThreadMessagesView -> sync -> error', error);
+ log('err_thread_messages_sync', error);
this.setState({ loading: false });
}
}
diff --git a/ios/RocketChatRN.xcodeproj/xcshareddata/xcschemes/RocketChatRN.xcscheme b/ios/RocketChatRN.xcodeproj/xcshareddata/xcschemes/RocketChatRN.xcscheme
index faeafa72..578a99fb 100644
--- a/ios/RocketChatRN.xcodeproj/xcshareddata/xcschemes/RocketChatRN.xcscheme
+++ b/ios/RocketChatRN.xcodeproj/xcshareddata/xcschemes/RocketChatRN.xcscheme
@@ -99,6 +99,16 @@
ReferencedContainer = "container:RocketChatRN.xcodeproj">
+
+
+
+
+
+