Skip to content

Commit 728674d

Browse files
committed
Rename init() to initialize()
1 parent 3ba3c8d commit 728674d

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Outputs something like this:
7878
```
7979
using juzzlin::L;
8080
81-
L::init("/tmp/myLog.txt");
81+
L::initialize("/tmp/myLog.txt");
8282
8383
L().info() << "Something happened";
8484
```
@@ -88,7 +88,7 @@ L().info() << "Something happened";
8888
```
8989
using juzzlin::L;
9090
91-
L::init("/tmp/myLog.txt");
91+
L::initialize("/tmp/myLog.txt");
9292
L::enableEchoMode(false);
9393
9494
L().info() << "Something happened";

src/simple_logger.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class SimpleLogger::Impl
7070

7171
static void setStream(Level level, std::ostream & stream);
7272

73-
static void init(std::string filename, bool append);
73+
static void initialize(std::string filename, bool append);
7474

7575
void flush();
7676

@@ -288,7 +288,7 @@ void SimpleLogger::Impl::flush()
288288
}
289289
}
290290

291-
void SimpleLogger::Impl::init(std::string filename, bool append)
291+
void SimpleLogger::Impl::initialize(std::string filename, bool append)
292292
{
293293
if (!filename.empty()) {
294294
m_fileStream.open(filename, append ? std::ofstream::out | std::ofstream::app : std::ofstream::out);
@@ -343,9 +343,9 @@ SimpleLogger::SimpleLogger(const std::string & tag)
343343
{
344344
}
345345

346-
void SimpleLogger::init(std::string filename, bool append)
346+
void SimpleLogger::initialize(std::string filename, bool append)
347347
{
348-
Impl::init(filename, append);
348+
Impl::initialize(filename, append);
349349
}
350350

351351
void SimpleLogger::enableEchoMode(bool enable)

src/simple_logger.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace juzzlin {
3535
*
3636
* using juzzlin::L;
3737
*
38-
* L::init("myLog.txt");
38+
* L::initialize("myLog.txt");
3939
*
4040
* Example logging:
4141
*
@@ -81,7 +81,7 @@ class SimpleLogger
8181
* \param filename Log to filename. Disabled if empty.
8282
* \param append The existing log will be appended if true.
8383
* Throws on error. */
84-
static void init(std::string filename, bool append = false);
84+
static void initialize(std::string filename, bool append = false);
8585

8686
//! Enable/disable echo mode.
8787
//! \param enable Echo everything if true. Default is false.

src/tests/file_test/file_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void testAllLoggingLevels_allMessagesShouldBeFoundInFile(const std::string & log
6767

6868
void initializeLoggger(const std::string & logFileName, const std::string & timestampSeparator)
6969
{
70-
L::init(logFileName);
70+
L::initialize(logFileName);
7171
L::enableEchoMode(true);
7272
L::setLoggingLevel(L::Level::Trace);
7373
L::setTimestampMode(L::TimestampMode::DateTime);

0 commit comments

Comments
 (0)