-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tobias Falk
authored and
Tobias Falk
committed
Oct 21, 2020
1 parent
069edf0
commit aac10a1
Showing
32 changed files
with
2,679 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Example List | ||
1. example_1(example_1.cpp):<br> | ||
shows how the basic FLogger class is used | ||
|
||
#include <iostream> | ||
#include <FLibraryCollection/FLogger/FLogger.hpp> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
//Creating the class | ||
FLogger::Logger log; | ||
//creating the cass with log file name and path | ||
|
||
//seting up all the parameters | ||
log.setLogName("log_example_1"); //Here the name of the Log file will be set the time of creation will be writen in front | ||
log.setPath("logs/"); //Here the path to the Log file will be set if you want the file to be in the main folder leaf it empty | ||
log.setStartText("Start Text"); //Here the text that will be writen at the beginging of the log is set if you don't call it it will be empty | ||
log.setEndText("End Text"); //Here the text that will be writen at the beginging of the log is set if you don't call it it will be END | ||
//starting the logfile | ||
log.start(); //Here the file will be created and opend and all the functions that were caled in the setup will have no effect | ||
|
||
//writing to the log simply | ||
log.write("normal write"); | ||
log.info("normal info"); | ||
log.warning("normal waring"); | ||
log.error("normal error"); | ||
log.fatalError("normal fatal error"); | ||
|
||
//writing to the log with error place | ||
log.write("place write", __LINE__, __FILE__, __func__); | ||
log.info("place info", __LINE__, __FILE__, __func__); | ||
log.warning("place waring", __LINE__, __FILE__, __func__); | ||
log.error("place error", __LINE__, __FILE__, __func__); | ||
log.fatalError("place fatal error", __LINE__, __FILE__, __func__); | ||
return 0; | ||
} | ||
|
||
|
||
2. example_2:<br> | ||
42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
project(example_1 LANGUAGES CXX) | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
add_executable(example_1 | ||
main.cpp | ||
) | ||
|
||
target_link_libraries(example_1 PRIVATE FLogger) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
2020-10-20|13:10:45 normal write | ||
2020-10-20|13:10:45 INFO normal info | ||
2020-10-20|13:10:45 WARNING normal waring | ||
2020-10-20|13:10:45 ERROR normal error | ||
2020-10-20|13:10:45 FATAL normal fatal error | ||
2020-10-20|13:10:45 File: /home/tobias/git/FLibraryCollection/examples/example_1/main.cpp Line: 26 Function: main place write | ||
2020-10-20|13:10:45 INFO File: /home/tobias/git/FLibraryCollection/examples/example_1/main.cpp Line: 27 Function: main place info | ||
2020-10-20|13:10:45 WARNING File: /home/tobias/git/FLibraryCollection/examples/example_1/main.cpp Line: 28 Function: main place waring | ||
2020-10-20|13:10:45 ERROR File: /home/tobias/git/FLibraryCollection/examples/example_1/main.cpp Line: 29 Function: main place error | ||
2020-10-20|13:10:45 FATAL File: /home/tobias/git/FLibraryCollection/examples/example_1/main.cpp Line: 30 Function: main place fatal error | ||
End Text |
Oops, something went wrong.