diff --git a/packages/state-manager/src/sagas/appConnection/uptime/uptime.saga.ts b/packages/state-manager/src/sagas/appConnection/uptime/uptime.saga.ts index ee96deefa5..92819a2362 100644 --- a/packages/state-manager/src/sagas/appConnection/uptime/uptime.saga.ts +++ b/packages/state-manager/src/sagas/appConnection/uptime/uptime.saga.ts @@ -4,7 +4,7 @@ import { connectionActions } from '../connection.slice' export function* uptimeSaga(): Generator { // There is no point in updating this more often as we don't need precise data here, but we want to avoid spamming redux with excess actions const interval = 10000 - console.log(`Updating uptime on interval ${interval}ms`) + console.info(`Updating uptime on interval ${interval}ms`) while (true) { yield* put(connectionActions.updateUptime(interval)) yield* delay(interval) diff --git a/packages/state-manager/src/sagas/files/autoDownloadFiles/autoDownloadFiles.saga.ts b/packages/state-manager/src/sagas/files/autoDownloadFiles/autoDownloadFiles.saga.ts index 7fbb4f61f6..084a7a8527 100644 --- a/packages/state-manager/src/sagas/files/autoDownloadFiles/autoDownloadFiles.saga.ts +++ b/packages/state-manager/src/sagas/files/autoDownloadFiles/autoDownloadFiles.saga.ts @@ -14,7 +14,7 @@ export function* autoDownloadFilesSaga( ): Generator { const identity = yield* select(identitySelectors.currentIdentity) if (!identity) { - console.error('Could not autodownload files, no identity') + logger.error('Could not autodownload files, no identity') return } diff --git a/packages/state-manager/src/sagas/publicChannels/createChannel/createChannel.saga.ts b/packages/state-manager/src/sagas/publicChannels/createChannel/createChannel.saga.ts index 4b4afcbc30..eac5acb883 100644 --- a/packages/state-manager/src/sagas/publicChannels/createChannel/createChannel.saga.ts +++ b/packages/state-manager/src/sagas/publicChannels/createChannel/createChannel.saga.ts @@ -10,7 +10,7 @@ export function* createChannelSaga( socket: Socket, action: PayloadAction['payload']> ): Generator { - console.log(`Creating channel ${action.payload.channel.name}`) + console.info(`Creating channel ${action.payload.channel.name}`) const response = yield* apply( socket, diff --git a/packages/state-manager/src/sagas/publicChannels/createGeneralChannel/createGeneralChannel.saga.ts b/packages/state-manager/src/sagas/publicChannels/createGeneralChannel/createGeneralChannel.saga.ts index 3ba9f36f30..901dbbedf2 100644 --- a/packages/state-manager/src/sagas/publicChannels/createGeneralChannel/createGeneralChannel.saga.ts +++ b/packages/state-manager/src/sagas/publicChannels/createGeneralChannel/createGeneralChannel.saga.ts @@ -11,7 +11,7 @@ export function* createGeneralChannelSaga(): Generator { console.error('Could not create general channel. No identity') return } - console.log(`Creating general channel for ${identity.nickname}`) + console.info(`Creating general channel for ${identity.nickname}`) const timestamp = yield* call(getChannelTimestamp) const id = yield* call(generateChannelId, 'general') diff --git a/packages/state-manager/src/sagas/publicChannels/deleteChannel/deleteChannel.saga.ts b/packages/state-manager/src/sagas/publicChannels/deleteChannel/deleteChannel.saga.ts index 24fde323d6..d69c6cf228 100644 --- a/packages/state-manager/src/sagas/publicChannels/deleteChannel/deleteChannel.saga.ts +++ b/packages/state-manager/src/sagas/publicChannels/deleteChannel/deleteChannel.saga.ts @@ -22,7 +22,7 @@ export function* deleteChannelSaga( const isGeneral = channelId === generalChannel.id - console.log(`Deleting channel ${channelId}`) + console.info(`Deleting channel ${channelId}`) const response = yield* apply( socket, diff --git a/packages/state-manager/src/sagas/publicChannels/publicChannels.transform.ts b/packages/state-manager/src/sagas/publicChannels/publicChannels.transform.ts index 9b3cb2831c..05858a5d0d 100644 --- a/packages/state-manager/src/sagas/publicChannels/publicChannels.transform.ts +++ b/packages/state-manager/src/sagas/publicChannels/publicChannels.transform.ts @@ -26,8 +26,8 @@ const getGeneralChannelId = (state: PublicChannelsState) => { const selectors = publicChannelsAdapter.getSelectors() const publicChannelStorage = selectors.selectAll(state.channels) const generalChannel = publicChannelStorage.find(channel => channel.name === 'general') - console.log('PublicChannelsTransform: existing general channel id', generalChannel?.id) + console.info('PublicChannelsTransform: existing general channel id', generalChannel?.id) const generalChannelId = generalChannel?.id || INITIAL_CURRENT_CHANNEL_ID - console.log('PublicChannelsTransform: new general channel id', generalChannelId) + console.info('PublicChannelsTransform: new general channel id', generalChannelId) return generalChannelId } diff --git a/packages/state-manager/src/sagas/users/userProfile/saveUserProfile.saga.ts b/packages/state-manager/src/sagas/users/userProfile/saveUserProfile.saga.ts index 93285c0032..98734e9a1d 100644 --- a/packages/state-manager/src/sagas/users/userProfile/saveUserProfile.saga.ts +++ b/packages/state-manager/src/sagas/users/userProfile/saveUserProfile.saga.ts @@ -44,7 +44,7 @@ export function* saveUserProfileSaga(socket: Socket, action: PayloadAction<{ pho pubKey, } - console.log(`Saving user profile: ${userProfile}`) + console.info(`Saving user profile: ${userProfile}`) yield* apply(socket, socket.emit, applyEmitParams(SocketActionTypes.SET_USER_PROFILE, userProfile)) } diff --git a/packages/state-manager/src/utils/functions/storybookLog/storybookLog.function.ts b/packages/state-manager/src/utils/functions/storybookLog/storybookLog.function.ts index 62f77e0a7b..8cdbc102bb 100644 --- a/packages/state-manager/src/utils/functions/storybookLog/storybookLog.function.ts +++ b/packages/state-manager/src/utils/functions/storybookLog/storybookLog.function.ts @@ -1,11 +1,11 @@ export const storybookLog = (message: string) => (...args: unknown[]): void => { - console.log(message) + console.info(message) if (args.length > 0) { args.forEach(arg => { - console.log(arg) + console.info(arg) }) } } diff --git a/packages/state-manager/src/utils/functions/storybookLog/storybookLog.test.ts b/packages/state-manager/src/utils/functions/storybookLog/storybookLog.test.ts index 6d6634bd7e..74557497ba 100644 --- a/packages/state-manager/src/utils/functions/storybookLog/storybookLog.test.ts +++ b/packages/state-manager/src/utils/functions/storybookLog/storybookLog.test.ts @@ -17,20 +17,20 @@ describe('storybookLog function', () => { expect(typeof returned).toEqual('function') }) - it('should call `console.log` with passed message', () => { + it('should call `console.info` with passed message', () => { storybookLog(consoleLogMessage)() - expect(console.log).toHaveBeenCalledWith(consoleLogMessage) - expect(console.log).toHaveBeenCalledTimes(1) + expect(console.info).toHaveBeenCalledWith(consoleLogMessage) + expect(console.info).toHaveBeenCalledTimes(1) }) - it('should call `console.log` with passed args', () => { + it('should call `console.info` with passed args', () => { const args = ['something', 5] storybookLog(consoleLogMessage)(...args) - expect(console.log).toHaveBeenCalledWith(consoleLogMessage) - expect(console.log).toHaveBeenCalledWith(args[0]) - expect(console.log).toHaveBeenCalledWith(args[1]) - expect(console.log).toHaveBeenCalledTimes(3) + expect(console.info).toHaveBeenCalledWith(consoleLogMessage) + expect(console.info).toHaveBeenCalledWith(args[0]) + expect(console.info).toHaveBeenCalledWith(args[1]) + expect(console.info).toHaveBeenCalledTimes(3) }) })