Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky committed Nov 7, 2024
1 parent 81fd553 commit cfb52ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
3 changes: 1 addition & 2 deletions packages/signals/signals/src/lib/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { parseSignalsLoggingAdvancedQueryString } from '../../core/debug-mode'
import { DebugStorage } from '../storage/debug-storage'

class Logger {
private storageType = 'sessionStorage' as const
private static advancedLogging = 'segment_signals_logging_advanced'

storage = new DebugStorage(this.storageType)
storage = new DebugStorage('sessionStorage')
constructor() {
const val = parseSignalsLoggingAdvancedQueryString()
if (typeof val === 'boolean') {
Expand Down
15 changes: 3 additions & 12 deletions packages/signals/signals/src/plugin/signals-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,9 @@ export class SignalsPlugin implements Plugin, SignalsAugmentedFunctionality {
}

/**
* Enable redaction and disable ingestion of signals.
* Enable redaction and disable ingestion of signals. Also, logs signals to the console.
*/
debug() {
this.signals.debug()
}

/**
* Log signals to the console.
*/
enableDebugLogging(
...args: Parameters<typeof this.signals.enableDebugLogging>
) {
this.signals.enableDebugLogging(...args)
debug(boolean = true): void {
this.signals.debug(boolean)
}
}

0 comments on commit cfb52ea

Please sign in to comment.