-
Notifications
You must be signed in to change notification settings - Fork 390
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
1 parent
a6b5e51
commit 8b4cccc
Showing
6 changed files
with
48 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// AndroidNative - shows how to use an Android appender. | ||
// | ||
|
||
#include <plog/Log.h> | ||
#include <plog/Init.h> | ||
#include <plog/Formatters/TxtFormatter.h> | ||
#include <plog/Appenders/AndroidAppender.h> | ||
|
||
int main() | ||
{ | ||
static plog::AndroidAppender<plog::TxtFormatter> androidAppender("app"); | ||
plog::init(plog::verbose, &androidAppender); | ||
|
||
PLOG_VERBOSE << "This is a VERBOSE message"; | ||
PLOG_DEBUG << "This is a DEBUG message"; | ||
PLOG_INFO << "This is an INFO message"; | ||
PLOG_WARNING << "This is a WARNING message"; | ||
PLOG_ERROR << "This is an ERROR message"; | ||
PLOG_FATAL << "This is a FATAL message"; | ||
|
||
return 0; | ||
} |
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 |
---|---|---|
@@ -1,2 +1,13 @@ | ||
add_custom_target(Android SOURCES jni/Sample.cpp) | ||
set_target_properties(Android PROPERTIES FOLDER Samples) | ||
if(ANDROID) | ||
add_library(AndroidJNI SHARED AndroidJNI/Main.cpp) | ||
target_link_libraries(AndroidJNI plog) | ||
|
||
add_executable(AndroidNative AndroidNative/Main.cpp) | ||
target_link_libraries(AndroidNative plog) | ||
else() | ||
add_custom_target(AndroidJNI SOURCES AndroidJNI/Main.cpp) | ||
add_custom_target(AndroidNative SOURCES AndroidNative/Main.cpp) | ||
endif() | ||
|
||
set_target_properties(AndroidJNI PROPERTIES FOLDER Samples/Android) | ||
set_target_properties(AndroidNative PROPERTIES FOLDER Samples/Android) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.