Skip to content

Commit

Permalink
fix: allow exp override (#1190)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason C. Leach <[email protected]>
  • Loading branch information
jleach authored Jul 9, 2024
1 parent e84f385 commit 50dd983
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/remote-logs/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ export class RemoteLogger extends BaseLogger {
this.eventListener = undefined
}

public overrideCurrentAutoDisableExpiration(expirationInMinutes: number) {
if (expirationInMinutes <= 0) {
return
}

if (this.remoteLoggingAutoDisableTimer) {
clearTimeout(this.remoteLoggingAutoDisableTimer)
}

this.remoteLoggingAutoDisableTimer = setTimeout(() => {
this.remoteLoggingEnabled = false
}, expirationInMinutes * 60000)
}

public test(message: string, data?: object | undefined): void {
this.log?.test({ message, data })
}
Expand Down

0 comments on commit 50dd983

Please sign in to comment.