mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
add detailed debug log for BinaryData
This commit is contained in:
parent
b995c329ed
commit
76cf268ef4
@ -49,7 +49,7 @@ export async function startOpenConnectionCallback(
|
||||
const methodLogger = createLogger('startOpenConnectionCallback')
|
||||
methodLogger.addContext('handshakeID', handshakeID)
|
||||
methodLogger.debug(`Authentication: startOpenConnectionCallback() with:`, {
|
||||
publicKey,
|
||||
publicKey: publicKey.asHex(),
|
||||
})
|
||||
const pendingState = await findPendingCommunityHandshake(publicKey, api, false)
|
||||
if (pendingState) {
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
import { getLogger } from 'log4js'
|
||||
import { LOG4JS_BASE_CATEGORY_NAME } from '../const'
|
||||
|
||||
const logging = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.helper.BinaryData`)
|
||||
|
||||
/**
|
||||
* Class mainly for handling ed25519 public keys,
|
||||
* to make sure we have always the correct Format (Buffer or Hex String)
|
||||
@ -7,6 +12,12 @@ export class BinaryData {
|
||||
private hex: string
|
||||
|
||||
constructor(input: Buffer | string | undefined) {
|
||||
if (!input) {
|
||||
logging.debug('constructor() with undefined input')
|
||||
}
|
||||
logging.debug(`constructor() input type: ${typeof input}`)
|
||||
logging.debug(`constructor() input isBuffer: ${Buffer.isBuffer(input)}`)
|
||||
logging.debug(`constructor() input: ${input}`)
|
||||
if (typeof input === 'string') {
|
||||
this.buf = Buffer.from(input, 'hex')
|
||||
this.hex = input
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user