Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
2
2024ustc-jianmu-compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
compiler_staff
2024ustc-jianmu-compiler
Commits
a0a7dd01
Commit
a0a7dd01
authored
Sep 08, 2024
by
JYJSXX
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
817df42c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
src/CMakeLists.txt
src/CMakeLists.txt
+4
-0
src/main.cpp
src/main.cpp
+0
-3
src/test_logging.cpp
src/test_logging.cpp
+11
-0
No files found.
src/CMakeLists.txt
View file @
a0a7dd01
add_executable
(
lab0_debug main.cpp Human.cpp Student.cpp logging.cpp
)
add_executable
(
test_logging test_logging.cpp
)
\ No newline at end of file
src/main.cpp
View file @
a0a7dd01
...
...
@@ -4,7 +4,6 @@
#include <stdio.h>
#include "Human.hpp"
#include "Student.hpp"
#include "logging.hpp"
#include <vector>
class
check
{
...
...
@@ -32,8 +31,6 @@ int main(int argc, char** argv){
auto
student1
=
static_cast
<
Student
*>
(
vec
.
back
());
// check check1 = check(vec.back()); //TODO: Error 2 : why?
check
check1
=
check
(
student1
);
// LOG(DEBUG) << student1->print();
// LOG(WARNING) << human.print();
// std::list<int> list;
// list.push_back(1);
...
...
src/test_logging.cpp
0 → 100644
View file @
a0a7dd01
#include "logging.hpp"
// 引入头文件
int
main
(){
LOG
(
DEBUG
)
<<
"This is DEBUG log item."
;
// 使用关键字 LOG,括号中填入要输出的日志等级
// 紧接着就是<<以及日志的具体信息,就跟使用 std::cout 一样
LOG
(
INFO
)
<<
"This is INFO log item"
;
LOG
(
WARNING
)
<<
"This is WARNING log item"
;
LOG
(
ERROR
)
<<
"This is ERROR log item"
;
return
0
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment