To create a new log category, first declare a log category in a header file.
// ClassName.h
DECLARE_LOG_CATEGORY_EXTERN(LogCategoryName, Log, All);
Second, define the category in an implementation file.
// ClassName.cpp
DEFINE_LOG_CATEGORY(LogCategoryName);
Use the UE_LOG
macro to print a log to the output window (editor) or to the log (game).
UE_LOG(LogCategoryName, Log|Error|Warning, TEXT("Log text."));