diff options
author | Adam <Adam@anope.org> | 2017-01-23 12:35:14 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-01-23 12:35:14 -0500 |
commit | 16ca76c2e7ab287e480185fbb03a0bb438351eda (patch) | |
tree | dfb25534afa2352b65b2ee707086cb5eecc96fbb /modules/encryption/bcrypt.cpp | |
parent | ff030c1eb7c3764f9add2a689479e84d616cabcb (diff) |
Make log system use newer format strings
Also allow log messages to be translatable
Diffstat (limited to 'modules/encryption/bcrypt.cpp')
-rw-r--r-- | modules/encryption/bcrypt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/encryption/bcrypt.cpp b/modules/encryption/bcrypt.cpp index 622fef745..3375e4bee 100644 --- a/modules/encryption/bcrypt.cpp +++ b/modules/encryption/bcrypt.cpp @@ -906,7 +906,7 @@ class EBCRYPT : public Module EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) override { dest = "bcrypt:" + Generate(src, Salt()); - Log(LOG_DEBUG_2) << "(enc_bcrypt) hashed password from [" << src << "] to [" << dest << "]"; + logger.Debug2("hashed password from {0} to {1}", src, dest); return EVENT_ALLOW; } @@ -941,7 +941,7 @@ class EBCRYPT : public Module } catch (const ConvertException &) { - Log(this) << "Could not get the round size of a hash. This is probably a bug. Hash: " << nc->GetPassword(); + logger.Log("Could not get the round size of a hash. This is probably a bug. Hash: {0}", nc->GetPassword()); } if (ModuleManager::FindFirstOf(ENCRYPTION) != this || (hashrounds && hashrounds != rounds)) @@ -962,20 +962,20 @@ class EBCRYPT : public Module if (rounds == 0) { rounds = 10; - Log(this) << "Rounds can't be 0! Setting ignored."; + logger.Log("Rounds can't be 0! Setting ignored."); } else if (rounds < 10) { - Log(this) << "10 to 12 rounds is recommended."; + logger.Log("10 to 12 rounds is recommended."); } else if (rounds >= 32) { rounds = 10; - Log(this) << "The maximum number of rounds supported is 31. Ignoring setting and using 10."; + logger.Log("The maximum number of rounds supported is 31. Ignoring setting and using 10."); } else if (rounds >= 14) { - Log(this) << "Are you sure you want to use " << stringify(rounds) << " in your bcrypt settings? This is very CPU intensive! Recommended rounds is 10-12."; + logger.Log("Are you sure you want to use {0} in your bcrypt settings? This is very CPU intensive! Recommended rounds is 10-12.", rounds); } } }; |