CryptRand: remove newlines from logging message
authorAntoine Musso <hashar@free.fr>
Thu, 10 Nov 2016 14:33:23 +0000 (15:33 +0100)
committerAntoine Musso <hashar@free.fr>
Thu, 10 Nov 2016 14:33:23 +0000 (15:33 +0100)
commiteab0c949022fe99b6fff0dda1bfd5c8f317b142a
tree74b3467107cd65f41a5e6f7a4261b7a018be8a6c
parent9b4cea6d2ea9a1a6fd9d9d8b9db087dfd7afaa90
CryptRand: remove newlines from logging message

5bd6de6 converted CryptRand to use the logger command but kept the
newlines in the message which is needed for wfDebug() but not with the
logger interface.

Patch also removed a call to wfGetAllCallers() from the first debug
message of generate(), leaving an uneeded debugging message.

Hence we had output such as:
---
[CryptRand] Generating cryptographic random bytes for

[CryptRand] mcrypt_create_iv generated 20 bytes of randomness.

[CryptRand] 0 bytes of randomness leftover in the buffer.

---

Drop the newlines from all debug message.
Drop the lonely debug message from generate().

Result:
---
[CryptRand] mcrypt_create_iv generated 20 bytes of randomness.
[CryptRand] 0 bytes of randomness leftover in the buffer.
---

Change-Id: I572206296fc3a0a498febb18925672a67480eb18
includes/libs/CryptRand.php